aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGoldstein <root@goldstein.rs>2024-08-05 16:26:39 +0300
committerGoldstein <root@goldstein.rs>2024-08-07 15:58:44 +0300
commit9adfd9b8ad48f631c935d5a146bbf98a3cf603cb (patch)
treed60c104ed8e0a7c1e6fd338af61c341670587352 /tests
parent66469fc281fc4abb3284574f77a8051fee8116b9 (diff)
src/libcmd/repl.cc: allow :log /path/to/store.drv
This adds a second form to the `:log` command: it now can accept a derivation path in addition to a derivation expression. As derivation store paths start with `/nix/store`, this is not ambiguous. Resolves: https://git.lix.systems/lix-project/lix/issues/51 Change-Id: Iebc7b011537e7012fae8faed4024ea1b8fdc81c3
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/repl.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/functional/repl.sh b/tests/functional/repl.sh
index 22c69e20b..1f2c2e93f 100644
--- a/tests/functional/repl.sh
+++ b/tests/functional/repl.sh
@@ -271,3 +271,8 @@ a = ''test string that we'll grep later''
:e identity
a
" "undefined variable"
+
+# Test :log with derivation paths.
+simple_path="$(nix-instantiate "$testDir/simple.nix")"
+# `PATH=` is a part of build log.
+testReplResponseNoRegex ":log ${simple_path}" "PATH="