test file copying
This commit is contained in:
parent
b788aa4416
commit
9fc7817e0e
|
@ -1,5 +1,5 @@
|
||||||
msg:
|
msg:
|
||||||
{ actual, expected, asString ? false, asJSON ? false, removeDunders ? false, }:
|
{ actual, expected, asString ? false, asJSON ? false, removeDunders ? false, safeToPrint ? true }:
|
||||||
let
|
let
|
||||||
preProcess = v:
|
preProcess = v:
|
||||||
if removeDunders then
|
if removeDunders then
|
||||||
|
@ -21,4 +21,5 @@ builtins.trace actual
|
||||||
builtins.trace expected
|
builtins.trace expected
|
||||||
''
|
''
|
||||||
echo FAILED ${msg}
|
echo FAILED ${msg}
|
||||||
|
echo '${if safeToPrint then builtins.toJSON actual else ""}'
|
||||||
''
|
''
|
||||||
|
|
|
@ -218,4 +218,21 @@ in with site; [
|
||||||
};
|
};
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
(it "copies all the files" ({
|
||||||
|
actual = copyTo "." {
|
||||||
|
page = "this is a page";
|
||||||
|
subdir = {
|
||||||
|
page = "this page is in a subdir";
|
||||||
|
link = ./src;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
expected = ''
|
||||||
|
cp /nix/store/crirfz0n6f8dgl1si3x7pwyw7fqm0r8l-page ./page
|
||||||
|
mkdir -p ./subdir
|
||||||
|
cp -r /nix/store/q95cn7ccixzi9w22aic4bl0ykk40ka7v-src ./subdir/link
|
||||||
|
cp /nix/store/ic6fyy8wg8r4338a3m5kinmg11igxsyj-page ./subdir/page
|
||||||
|
|
||||||
|
'';
|
||||||
|
}))
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue