yq-go: add simple test
This commit is contained in:
parent
8a945c941e
commit
47c48e0417
@ -1,4 +1,4 @@
|
|||||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, runCommand, yq-go }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "yq-go";
|
pname = "yq-go";
|
||||||
@ -24,6 +24,13 @@ buildGoModule rec {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
simple = runCommand "${pname}-test" {} ''
|
||||||
|
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
|
||||||
|
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Portable command-line YAML processor";
|
description = "Portable command-line YAML processor";
|
||||||
homepage = "https://mikefarah.gitbook.io/yq/";
|
homepage = "https://mikefarah.gitbook.io/yq/";
|
||||||
|
Loading…
Reference in New Issue
Block a user