2020-12-23 18:30:39 +01:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
|
|
|
name = "ripgrep";
|
2021-01-10 20:08:30 +01:00
|
|
|
meta = with pkgs.lib.maintainers; { maintainers = [ nequissimus ]; };
|
2020-12-23 18:30:39 +01:00
|
|
|
|
|
|
|
nodes.ripgrep = { pkgs, ... }: { environment.systemPackages = [ pkgs.ripgrep ]; };
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
ripgrep.succeed('echo "abc\nbcd\ncde" > /tmp/foo')
|
|
|
|
assert "bcd" in ripgrep.succeed("rg -N 'bcd' /tmp/foo")
|
|
|
|
assert "bcd\ncde" in ripgrep.succeed("rg -N 'cd' /tmp/foo")
|
|
|
|
assert "ripgrep ${pkgs.ripgrep.version}" in ripgrep.succeed("rg --version | head -1")
|
|
|
|
'';
|
|
|
|
})
|