diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-26 23:28:08 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-26 23:32:30 +0200 |
| commit | afb2fdd010c34283314fc44ec3e7c8dbfea98a47 (patch) | |
| tree | fa4bf34ee8d9d9e49a35125d86b949b197e43054 /test | |
| parent | 3a7f1d3de38aac9613a3647c3d1db367f34d2084 (diff) | |
| download | bash-completion-afb2fdd010c34283314fc44ec3e7c8dbfea98a47.tar.gz | |
export: Fix many use cases, add option completion.
Diffstat (limited to 'test')
| -rw-r--r-- | test/completion/export.exp | 1 | ||||
| -rw-r--r-- | test/lib/completions/export.exp | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/test/completion/export.exp b/test/completion/export.exp new file mode 100644 index 00000000..bab517a9 --- /dev/null +++ b/test/completion/export.exp @@ -0,0 +1 @@ +assert_source_completions export diff --git a/test/lib/completions/export.exp b/test/lib/completions/export.exp new file mode 100644 index 00000000..84cb9170 --- /dev/null +++ b/test/lib/completions/export.exp @@ -0,0 +1,55 @@ +proc setup {} { + save_env +} + + +proc teardown {} { + assert_env_unmodified { + /OLDPWD=/d + } +} + + +setup + + +assert_complete_any "export BASH" +sync_after_int + + +assert_complete_any "export -n BASH" +sync_after_int + + +assert_no_complete "export -p " +sync_after_int + + +assert_complete_dir {bar "bar bar.d/" foo foo.d/} "export FOO=" \ + fixtures/shared/default +sync_after_int + + +assert_complete_dir {foo foo.d/} "export FOO=f" fixtures/shared/default "" \ + -expect-cmd-minus f +sync_after_int + + +# Functions: _export, _expand, ... +assert_complete_any "export -fn _ex" +sync_after_int + + +assert_complete_any "export -f -n _ex" +sync_after_int + + +assert_complete_any "export FOO=\$BASH" +sync_after_int + + +assert_complete_any "export -" +sync_after_int + + +teardown |
