summary refs log tree commit diff
path: root/nixos/tests/bat.nix
blob: 0f548a590fb02837eb50fe6210b4c8e5aef1a551 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "bat";
  meta = with pkgs.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")
  '';
})