File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -350,10 +350,9 @@ runRepl () {
350350 local testDirNoUnderscores
351351 testDirNoUnderscores=" ${testDir// _/ } "
352352
353- # TODO: pass arguments to nix repl; see lang.sh
354353 _NIX_TEST_RAW_MARKDOWN=1 \
355354 _NIX_TEST_REPL_ECHO=1 \
356- nix repl 2>&1 \
355+ nix repl " $@ " 2>&1 \
357356 | stripColors \
358357 | tr -d ' \0' \
359358 | stripEmptyLinesBeforePrompt \
@@ -373,7 +372,12 @@ for test in $(cd "$testDir/repl"; echo *.in); do
373372 in=" $testDir /repl/$test .in"
374373 actual=" $TEST_ROOT /$test .actual"
375374 expected=" $testDir /repl/$test .expected"
376- (cd " $testDir /repl" ; set +x; runRepl 2>&1 ) < " $in " > " $actual " || {
375+ declare -a flags=()
376+ if test -e " $testDir /repl/$test .flags" ; then
377+ read -r -a flags < " $testDir /repl/$test .flags"
378+ fi
379+
380+ (cd " $testDir /repl" ; set +x; runRepl " ${flags[@]} " 2>&1 ) < " $in " > " $actual " || {
377381 echo " FAIL: $test (exit code $? )" >&2
378382 badExitCode=1
379383 }
Original file line number Diff line number Diff line change 4343 | ^
4444 91| };
4545
46- (19999 duplicate frames omitted)
46+ (199 duplicate frames omitted)
4747
4848 error: stack overflow; max-call-depth exceeded
4949 at /path/to/tests/functional/repl/doc-functor.nix:90:23:
@@ -56,7 +56,7 @@ nix-repl> :doc diverging
5656error:
5757 … while partially calling '__functor' to retrieve documentation
5858
59- (10000 duplicate frames omitted)
59+ (100 duplicate frames omitted)
6060
6161 … while calling '__functor'
6262 at /path/to/tests/functional/repl/doc-functor.nix:103:21:
Original file line number Diff line number Diff line change 1+ --max-call-depth 100
You can’t perform that action at this time.
0 commit comments