Reviewed tests g*

Removed excess parenthesis from gdb completion
This commit is contained in:
Freddy Vulto 2009-07-18 09:43:25 +02:00
parent 22675a60f7
commit c6af1bf435
75 changed files with 418 additions and 502 deletions

View File

@ -32,7 +32,7 @@ _gdb()
elif [ $COMP_CWORD -eq 2 ]; then
prev=${prev##*/}
COMPREPLY=( $( compgen -fW "$( command ps axo comm,pid | \
awk '{if ($1 ~ /^'"$prev"'/) print $2}' ) )" \
awk '{if ($1 ~ /^'"$prev"'/) print $2}' )" \
-- "$cur" ) )
fi
} &&

View File

@ -1 +0,0 @@
source "lib/completions/g++.exp"

View File

@ -1 +0,0 @@
source "lib/completions/g4.exp"

View File

@ -1 +0,0 @@
source "lib/completions/g77.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gcc.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gcj.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gcl.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gdb.exp"

View File

@ -1 +0,0 @@
source "lib/completions/genaliases.exp"

View File

@ -1 +0,0 @@
source "lib/completions/getent.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gkrellm.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gmplayer.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gnatmake.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gpc.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gperf.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gpg.exp"

View File

@ -1 +0,0 @@
source "lib/completions/gprof.exp"

View File

@ -1 +0,0 @@
source "lib/completions/grep.exp"

View File

@ -1 +0,0 @@
source "lib/completions/grub.exp"

View File

@ -1 +1,3 @@
source "lib/completions/c++.exp"
if {[assert_bash_type {gcc}]} {
source "lib/completions/c++.exp"
}; # if

3
test/completion/g++.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gcc}]} {
source "lib/completions/g++.exp"
}; # if

3
test/completion/g4.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {g4}]} {
source "lib/completions/g4.exp"
}; # if

3
test/completion/g77.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gcc}]} {
source "lib/completions/g77.exp"
}; # if

3
test/completion/gcc.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gcc}]} {
source "lib/completions/gcc.exp"
}; # if

3
test/completion/gcj.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gcc}]} {
source "lib/completions/gcj.exp"
}; # if

3
test/completion/gcl.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gcl}]} {
source "lib/completions/gcl.exp"
}; # if

3
test/completion/gdb.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gdb}]} {
source "lib/completions/gdb.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {genaliases}]} {
source "lib/completions/genaliases.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {getent}]} {
source "lib/completions/getent.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gkrellm}]} {
source "lib/completions/gkrellm.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {mplayer}]} {
source "lib/completions/gmplayer.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gnatmake}]} {
source "lib/completions/gnatmake.exp"
}; # if

3
test/completion/gpc.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gcc}]} {
source "lib/completions/gpc.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gperf}]} {
source "lib/completions/gperf.exp"
}; # if

3
test/completion/gpg.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gpg}]} {
source "lib/completions/gpg.exp"
}; # if

View File

@ -0,0 +1,3 @@
if {[assert_bash_type {gprof}]} {
source "lib/completions/gprof.exp"
}; # if

3
test/completion/grep.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {grep}]} {
source "lib/completions/grep.exp"
}; # if

3
test/completion/grub.exp Normal file
View File

@ -0,0 +1,3 @@
if {[assert_bash_type {grub}]} {
source "lib/completions/grub.exp"
}; # if

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "g++ "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "g4 "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "g77 "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gcc "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gcj "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gcl "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gdb - "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "genaliases -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "getent "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gkrellm -"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gmplayer "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gnatmake "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gpc "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gperf --"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gpg "
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "gprof --"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "grep --"
sync_after_int
teardown

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "grub --"
sync_after_int
teardown

View File

@ -1,25 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
send "g++ \t"
expect {
-re "^g\\+\\+ \r\n.*g\\+\\+ $" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "g4 "
send "$cmd\t"
expect {
-re "^${cmd}(bash: p4: command not found\r\n)*\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "g77 "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gcc "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,31 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gcj "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
# Interrupt command
set test "Sync after INT"
sleep 0.01
send \031\003; # QUIT/INT
expect -ex /@
teardown

View File

@ -1,31 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gcl "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
# Interrupt command
set test "Sync after INT"
sleep 0.01
send \031\003; # QUIT/INT
expect -ex /@
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gdb - "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "genaliases -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "getent "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gkrellm -"
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gmplayer "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gnatmake "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gpc "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gperf "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,31 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gpg "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
# Interrupt command
set test "Sync after INT"
sleep 0.01
send \031\003; # QUIT/INT
expect -ex /@
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "gprof "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "grep "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown

View File

@ -1,26 +0,0 @@
proc setup {} {
}; # setup()
proc teardown {} {
}; # teardown()
setup
set test "Tab should complete"
# Try completion
set cmd "grub "
send "$cmd\t"
expect {
-re "^$cmd\r\n.*$cmd$" { pass "$test" }
-re /@ { unresolved "$test at prompt" }
-re eof { unresolved "eof" }
}; # expect
sync_after_int
teardown