aboutsummaryrefslogtreecommitdiff
path: root/tests/fetchPath.sh
diff options
context:
space:
mode:
authorpennae <82953136+pennae@users.noreply.github.com>2022-04-25 14:02:37 +0000
committerGitHub <noreply@github.com>2022-04-25 14:02:37 +0000
commitd6d6bbd9ef1eed6443165866cd7bd27faa9586a1 (patch)
tree38e55dcce53445088725a86c14c903106879e0b6 /tests/fetchPath.sh
parentf2603e9c92947a0e0c01fc34e754270f46c63790 (diff)
parent7f814d6d9af9d78f922d59115a94078f807676a8 (diff)
Merge branch 'master' into lto
Diffstat (limited to 'tests/fetchPath.sh')
-rw-r--r--tests/fetchPath.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/fetchPath.sh b/tests/fetchPath.sh
new file mode 100644
index 000000000..29be38ce2
--- /dev/null
+++ b/tests/fetchPath.sh
@@ -0,0 +1,6 @@
+source common.sh
+
+touch $TEST_ROOT/foo -t 202211111111
+# We only check whether 2022-11-1* **:**:** is the last modified date since
+# `lastModified` is transformed into UTC in `builtins.fetchTarball`.
+[[ "$(nix eval --impure --raw --expr "(builtins.fetchTree \"path://$TEST_ROOT/foo\").lastModifiedDate")" =~ 2022111.* ]]