diff options
Diffstat (limited to 'test/unit/compgen.exp')
-rw-r--r-- | test/unit/compgen.exp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/unit/compgen.exp b/test/unit/compgen.exp index 6673bf0e..6e6f79c6 100644 --- a/test/unit/compgen.exp +++ b/test/unit/compgen.exp @@ -1,11 +1,11 @@ proc setup {} { save_env -}; # setup() +} proc teardown {} { assert_env_unmodified {/OLDPWD/d} -}; # teardown() +} setup @@ -17,10 +17,9 @@ if {[lindex $::BASH_VERSINFO 0] <= 3} { } else { set test {compgen -f a\\\'b/ on bash-4 should return a\'b/c}; set cmd {compgen -f a\\\'b/} -}; # if -set dir fixtures/compgen -set prompt "/$dir/@" -assert_bash_exec "cd $dir" "" $prompt +} +set dir $::srcdir/fixtures/compgen +assert_bash_exec "cd $dir" send "$cmd\r" expect -ex "$cmd\r\n" expect { @@ -37,13 +36,13 @@ expect { if {[lindex $::BASH_VERSINFO 0] <= 3 } \ {pass $test} else {fail $test} } - -re $prompt { pass "$test" } + -re /@ { pass "$test" } -re eof { unresolved "eof" } -}; # expect -sync_after_int $prompt +} +sync_after_int assert_bash_exec {cd "$TESTDIR"} -#assert_bash_list_dir {a\\\'b/c} $cmd fixtures/compgen +#assert_bash_list_dir {a\\\'b/c} $cmd $::srcdir/fixtures/compgen sync_after_int |