nixosTests.aseprite: init

This commit is contained in:
Francesco Gazzetta 2021-11-18 19:10:48 +01:00
parent 6ac64dc1c4
commit f3ece9f26c
3 changed files with 37 additions and 0 deletions

View File

@ -230,6 +230,7 @@ in
leaps = handleTest ./leaps.nix {};
libinput = handleTest ./libinput.nix {};
libreddit = handleTest ./libreddit.nix {};
libresprite = handleTest ./libresprite.nix {};
libreswan = handleTest ./libreswan.nix {};
lidarr = handleTest ./lidarr.nix {};
lightdm = handleTest ./lightdm.nix {};

View File

@ -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")
'';
})

View File

@ -22,6 +22,8 @@
, AppKit
, Cocoa
, Foundation
, nixosTests
}:
stdenv.mkDerivation rec {
@ -79,6 +81,10 @@ stdenv.mkDerivation rec {
done
'';
passthru.tests = {
libresprite-can-open-png = nixosTests.libresprite;
};
meta = with lib; {
homepage = "https://libresprite.github.io/";
description = "Animated sprite editor & pixel art tool, fork of Aseprite";