lsd: Add test

This commit is contained in:
Tim Steinbach 2020-11-28 13:19:46 -05:00
parent ba3ad05930
commit 2d85247086
No known key found for this signature in database
GPG key ID: FD36A5EAAC49035A
3 changed files with 16 additions and 0 deletions

View file

@ -194,6 +194,7 @@ in
limesurvey = handleTest ./limesurvey.nix {};
login = handleTest ./login.nix {};
loki = handleTest ./loki.nix {};
lsd = handleTest ./lsd.nix {};
lxd = handleTest ./lxd.nix {};
lxd-nftables = handleTest ./lxd-nftables.nix {};
#logstash = handleTest ./logstash.nix {};

12
nixos/tests/lsd.nix Normal file
View file

@ -0,0 +1,12 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "lsd";
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.lsd = { pkgs, ... }: { environment.systemPackages = [ pkgs.lsd ]; };
testScript = ''
lsd.succeed('echo "abc" > /tmp/foo')
assert "4 B /tmp/foo" in lsd.succeed('lsd --classic --blocks "size,name" /tmp/foo')
assert "lsd ${pkgs.lsd.version}" in lsd.succeed("lsd --version")
'';
})

View file

@ -1,4 +1,5 @@
{ stdenv
, nixosTests
, fetchFromGitHub
, rustPlatform
, installShellFiles
@ -26,6 +27,8 @@ rustPlatform.buildRustPackage rec {
"--skip meta::filetype::test::test_socket_type"
];
passthru.tests = { inherit (nixosTests) lsd; };
meta = with stdenv.lib; {
homepage = "https://github.com/Peltoche/lsd";
description = "The next gen ls command";