diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-08-29 14:02:20 +0200 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2019-09-01 00:09:25 -0400 |
commit | ee7c590b605d07394f0f65c603bf5cf169e6caad (patch) | |
tree | aeb3ce7d82480256aa6e4bcf9dad9567e1c2caab /nixos/tests/fontconfig-default-fonts.nix | |
parent | b31c7e527e1c1495e554ca453e129c310f6dd210 (diff) |
nixos.tests.fontconfig-default-fonts: init
Make sure the fonts.enableDefaultFonts option works.
Diffstat (limited to 'nixos/tests/fontconfig-default-fonts.nix')
-rw-r--r-- | nixos/tests/fontconfig-default-fonts.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/tests/fontconfig-default-fonts.nix b/nixos/tests/fontconfig-default-fonts.nix new file mode 100644 index 0000000000000..1991cec92189f --- /dev/null +++ b/nixos/tests/fontconfig-default-fonts.nix @@ -0,0 +1,28 @@ +import ./make-test.nix ({ lib, ... }: +{ + name = "fontconfig-default-fonts"; + + machine = { config, pkgs, ... }: { + fonts.enableDefaultFonts = true; # Background fonts + fonts.fonts = with pkgs; [ + noto-fonts-emoji + cantarell-fonts + twitter-color-emoji + source-code-pro + gentium + ]; + fonts.fontconfig.defaultFonts = { + serif = [ "Gentium Plus" ]; + sansSerif = [ "Cantarell" ]; + monospace = [ "Source Code Pro" ]; + emoji = [ "Twitter Color Emoji" ]; + }; + }; + + testScript = '' + $machine->succeed("fc-match serif | grep '\"Gentium Plus\"'"); + $machine->succeed("fc-match sans-serif | grep '\"Cantarell\"'"); + $machine->succeed("fc-match monospace | grep '\"Source Code Pro\"'"); + $machine->succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'"); + ''; +}) |