Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{ fetchurl, callPackage }:
|
|
let
|
|
# More examples can be found at https://www.dangermouse.net/esoteric/piet/samples.html
|
|
hello-program = fetchurl {
|
|
url = "https://www.dangermouse.net/esoteric/piet/hw6.png";
|
|
hash = "sha256-E8OMu0b/oU8lDF3X4o5WMnnD1IKNT2YF+qe4MXLuczI=";
|
|
};
|
|
prime-tester-program = fetchurl {
|
|
url = "https://www.bertnase.de/npiet/nprime.gif";
|
|
hash = "sha256-4eaJweV/n73byoWZWCXiMLkfSEhMPf5itVwz48AK/FA=";
|
|
};
|
|
brainfuck-interpreter-program = fetchurl {
|
|
url = "https://www.dangermouse.net/esoteric/piet/piet_bfi.gif";
|
|
hash = "sha256-LIfOG0KFpr4nxAtLLeIsPQl+8Ujyvfz/YnEm/HRoVjY=";
|
|
};
|
|
in
|
|
{
|
|
hello = callPackage ./run-test.nix {
|
|
testName = "hello";
|
|
programPath = hello-program;
|
|
expectedOutput = "Hello, world!";
|
|
};
|
|
prime = callPackage ./run-test.nix {
|
|
testName = "prime";
|
|
programPath = prime-tester-program;
|
|
programInput = "2069";
|
|
expectedOutput = "Y";
|
|
};
|
|
no-prime = callPackage ./run-test.nix {
|
|
testName = "no-prime";
|
|
programPath = prime-tester-program;
|
|
programInput = "2070";
|
|
expectedOutput = "N";
|
|
};
|
|
brainfuck = callPackage ./run-test.nix {
|
|
testName = "brainfuck";
|
|
programPath = brainfuck-interpreter-program;
|
|
programInput = ",+>,+>,+>,+.<.<.<.|sdhO";
|
|
expectedOutput = "Piet";
|
|
};
|
|
}
|