Move bare source test to expect

This previously used /dev/tty to make sure we have `source` connected
to a terminal. Only as it turns out, FreeBSD doesn't have that (https://builds.sr.ht/~faho/job/15308).

So instead, let's just use the expect tests since stdin there is by
definition a terminal.
This commit is contained in:
Fabian Homborg 2018-12-11 18:21:22 +01:00
parent cf16d39872
commit 4cf3e62643
3 changed files with 5 additions and 4 deletions

View File

@ -56,3 +56,8 @@ send_line "echo hoge >| \n cat"
expect_prompt "hoge" {} unmatched {
puts stderr "Error with a pipe with redirection at the end of the line"
}
send_line "source; or echo failed"
expect_prompt "failed" {} unmatched {
puts stderr "Error with sourcing from the terminal"
}

View File

@ -213,9 +213,6 @@ echo 'echo "source argv {$argv}"' | source
echo 'echo "source argv {$argv}"' | source -
echo 'echo "source argv {$argv}"' | source - abc
echo 'echo "source argv {$argv}"' | source - abc def
# This hangs if it fails!
source </dev/tty
echo $status
always_fails
echo $status

View File

@ -140,4 +140,3 @@ source argv {}
source argv {abc}
source argv {abc def}
1
1