mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
bat: Add test
This commit is contained in:
parent
2d85247086
commit
fe8fa45573
3 changed files with 16 additions and 0 deletions
|
@ -30,6 +30,7 @@ in
|
|||
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
|
||||
awscli = handleTest ./awscli.nix { };
|
||||
babeld = handleTest ./babeld.nix {};
|
||||
bat = handleTest ./bat.nix {};
|
||||
bazarr = handleTest ./bazarr.nix {};
|
||||
bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64
|
||||
beanstalkd = handleTest ./beanstalkd.nix {};
|
||||
|
|
12
nixos/tests/bat.nix
Normal file
12
nixos/tests/bat.nix
Normal file
|
@ -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")
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue