nixpkgs/nixos/tests/bat.nix

13 lines
415 B
Nix
Raw Normal View History

2020-11-28 19:33:16 +01:00
import ./make-test-python.nix ({ pkgs, ... }: {
name = "bat";
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; };
2020-11-28 19:33:16 +01:00
machine = { pkgs, ... }: { environment.systemPackages = [ pkgs.bat ]; };
testScript = ''
machine.succeed("echo 'Foobar\n\n\n42' > /tmp/foo")
assert "Foobar" in machine.succeed("bat -p /tmp/foo")
assert "42" in machine.succeed("bat -p /tmp/foo -r 4:4")
'';
})