test perldoc options completion

This commit is contained in:
Guillaume Rousse 2010-11-07 20:17:28 +01:00
parent 4254f3a4a5
commit 6a51790506

View File

@ -11,25 +11,6 @@ proc teardown {} {
setup
set test "perldoc should complete options"
set cmd "perldoc -"
send "$cmd\t"
expect -ex "$cmd"
# We can't anchor on $, simulate typing a magical string instead.
set endguard "Magic End Guard"
send "$endguard"
expect {
# NOTE: Expected failure: After switching to pure perl perldoc completion,
# the completion of options has disappeared. See commit 07b7ddd1d
# and Alioth #312800
-re "^$endguard$" { xfail "$test" }
-re "-h.*$endguard$" { pass "$test" }
}
sync_after_int
set test "perldoc should complete word containing colons"
set cmd "perldoc File::"
send "$cmd\t"
@ -45,6 +26,15 @@ expect {
}
sync_after_int
set test "- should complete options"
set options {
-h -v -t -u -m -l -F -X -f -q
}
assert_complete $options "perldoc -"
sync_after_int