1 import ./make-test-python.nix ({ lib, pkgs, ... }:
3 name = "kbd-setfont-decompress";
5 meta.maintainers = with lib.maintainers; [ oxalica ];
7 nodes.machine = { ... }: {};
10 machine.succeed("gzip -cd ${pkgs.terminus_font}/share/consolefonts/ter-v16b.psf.gz >font.psf")
11 machine.succeed("gzip <font.psf >font.psf.gz")
12 machine.succeed("bzip2 <font.psf >font.psf.bz2")
13 machine.succeed("xz <font.psf >font.psf.xz")
14 machine.succeed("zstd <font.psf >font.psf.zst")
15 # setfont returns 0 even on error.
16 assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.gz 2>&1") == ""
17 assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.bz2 2>&1") == ""
18 assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.xz 2>&1") == ""
19 assert machine.succeed("PATH= ${pkgs.kbd}/bin/setfont font.psf.zst 2>&1") == ""