2014-09-22 04:02:41 +00:00
|
|
|
# vim: set filetype=expect:
|
|
|
|
#
|
|
|
|
# General tests that don't belong elsewhere
|
|
|
|
|
|
|
|
spawn $fish
|
|
|
|
|
|
|
|
expect_prompt
|
|
|
|
|
|
|
|
# ensure the Apple key () is typeable
|
|
|
|
send_line "echo "
|
|
|
|
expect_prompt "" {} unmatched {
|
|
|
|
puts stderr "Couldn't type apple key ()"
|
|
|
|
}
|
2015-04-20 09:04:17 +00:00
|
|
|
|
|
|
|
# check that history is returned in the right order (#2028)
|
|
|
|
# this hist_command nonsense is the cleanest way to send the $ char
|
|
|
|
set hist_command "echo \$history\[1\]"
|
|
|
|
|
|
|
|
# first send 'echo stuff'
|
|
|
|
send_line "echo stuff"
|
|
|
|
expect_prompt "stuff" {} unmatched {
|
|
|
|
puts stderr "Couldn't find expected output 'stuff'"
|
|
|
|
}
|
|
|
|
|
|
|
|
# last history item should be 'echo stuff'
|
|
|
|
send_line $hist_command
|
|
|
|
expect_prompt "echo stuff" {} unmatched {
|
|
|
|
puts stderr "Couldn't find expected output 'echo stuff'"
|
|
|
|
}
|
|
|
|
|
|
|
|
# last history command should be the one that printed the history
|
|
|
|
send_line $hist_command
|
|
|
|
expect_prompt -re {echo .history.*} {} unmatched {
|
|
|
|
puts stderr "Couldn't find expected output $hist_command"
|
|
|
|
}
|
2015-05-03 01:22:20 +00:00
|
|
|
|
|
|
|
# Backslashes at end of comments (#1255)
|
|
|
|
# This backslash should NOT cause the line to continue
|
|
|
|
send_line "echo -n #comment\\"
|
|
|
|
expect_prompt
|
|
|
|
|