diff options
author | Tim Steinbach <tim@nequissimus.com> | 2020-11-28 13:33:16 -0500 |
---|---|---|
committer | Tim Steinbach <tim@nequissimus.com> | 2020-11-28 13:42:36 -0500 |
commit | fe8fa45573b5eff05c44d6c70976c61e4b372cdd (patch) | |
tree | 2fb34ed1c33f885b12a5e9d7668dbf007ddc6d2b /nixos/tests/bat.nix | |
parent | 2d85247086e1d870472602291a60a13cf445e6fa (diff) |
bat: Add test
Diffstat (limited to 'nixos/tests/bat.nix')
-rw-r--r-- | nixos/tests/bat.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/tests/bat.nix b/nixos/tests/bat.nix new file mode 100644 index 000000000000..8e65e235d94f --- /dev/null +++ b/nixos/tests/bat.nix @@ -0,0 +1,12 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "bat"; + meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; }; + + 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") + ''; +}) |