diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2021-11-18 19:10:48 +0100 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2021-11-19 15:09:53 +0100 |
commit | f3ece9f26cb1ddd4f31359d6151852fa86818648 (patch) | |
tree | 030130779d9b9a97744ec995743406cd8b4082e1 /nixos/tests/libresprite.nix | |
parent | 6ac64dc1c403ce6fce6c00a59a46dedfe0b12160 (diff) |
nixosTests.aseprite: init
Diffstat (limited to 'nixos/tests/libresprite.nix')
-rw-r--r-- | nixos/tests/libresprite.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/tests/libresprite.nix b/nixos/tests/libresprite.nix new file mode 100644 index 0000000000000..1a6210e3671ae --- /dev/null +++ b/nixos/tests/libresprite.nix @@ -0,0 +1,30 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "libresprite"; + meta = with pkgs.lib.maintainers; { + maintainers = [ fgaz ]; + }; + + machine = { config, pkgs, ... }: { + imports = [ + ./common/x11.nix + ]; + + services.xserver.enable = true; + environment.systemPackages = [ + pkgs.imagemagick + pkgs.libresprite + ]; + }; + + enableOCR = true; + + testScript = + '' + machine.wait_for_x() + machine.succeed("convert -font DejaVu-Sans +antialias label:'IT WORKS' image.png") + machine.execute("libresprite image.png >&2 &") + machine.wait_for_window("LibreSprite v${pkgs.libresprite.version}") + machine.wait_for_text("IT WORKS") + machine.screenshot("screen") + ''; +}) |