Skip to content

Commit

Permalink
tests: fix chdir test by explicitely checking log file
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Jul 5, 2023
1 parent a9745e5 commit c3fc8be
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test-dirs/server-tests/chdir_to_root.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ In case server is running, stop it.
Check that the working directory of the server process is correctly restored.

$ touch test.ml
$ export MERLIN_LOG=-
$ $MERLIN server errors -filename test.ml < test.ml 2>&1 | grep 'old wd'
$ export MERLIN_LOG=$(pwd)/log

$ $MERLIN server errors -filename test.ml < test.ml 1>/dev/null
$ cat log | grep 'old wd'
changed directory to "$TESTCASE_ROOT" (old wd: "/")
$ $MERLIN server errors -filename test.ml < test.ml 2>&1 | grep 'old wd'
$ rm log

$ $MERLIN server errors -filename test.ml < test.ml 1>/dev/null
$ cat log | grep 'old wd'
changed directory to "$TESTCASE_ROOT" (old wd: "/")

$ unset MERLIN_LOG
$ $MERLIN server stop-server

0 comments on commit c3fc8be

Please sign in to comment.