1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 15:15:36 +00:00
nixpkgs/nixos/tests/ucg.nix

19 lines
573 B
Nix
Raw Normal View History

2020-11-29 23:00:38 +00:00
import ./make-test-python.nix ({ pkgs, ... }: {
name = "ucg";
meta = with pkgs.lib.maintainers; {
2020-11-29 23:00:38 +00:00
maintainers = [ AndersonTorres ];
};
machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.ucg ];
};
testScript = ''
machine.succeed("echo 'Lorem ipsum dolor sit amet\n2.7182818284590' > /tmp/foo")
assert "dolor" in machine.succeed("ucg 'dolor' /tmp/foo")
assert "Lorem" in machine.succeed("ucg --ignore-case 'lorem' /tmp/foo")
machine.fail("ucg --word-regexp '2718' /tmp/foo")
machine.fail("ucg 'pisum' /tmp/foo")
'';
})