50 Commits

Author SHA1 Message Date
Freddy Vulto
c4f3e907cd (testsuite) Fix screen test
Completing directories after `screen -c' passes on bash-4 now that
_filedir does a `compopt -o filenames'.
The test yields an expected failure on bash-3.
2009-12-04 22:12:54 +01:00
Freddy Vulto
932a4db5df (testsuite) Fix scp completions
match_items() now does a better job at maintaining a tcl list, that's
probably why the double escaping at scp isn't necessary anymore.
2009-12-03 18:44:30 +01:00
Freddy Vulto
048e27bf28 Merge branch 'master' of git+ssh://fvu-guest@git.debian.org/git/bash-completion/bash-completion 2009-12-02 21:15:50 +01:00
Freddy Vulto
c920661b5e (testsuite) Fix ssh test with colon completions
Function `assert_complete()' is becoming hairy but let's wait untill
other completions with other special characters come along before
refactoring.
2009-12-02 21:12:40 +01:00
Ville Skyttä
a6f79a9a69 Add jarsigner, pack200, and unpack200 completions. 2009-11-30 23:01:32 +02:00
Freddy Vulto
a9717be57b (testsuite) Moved location of making-list-unique
Moved making-expected-list-unique out of `match_items()' & `get_hosts()'
into `assert_complete()' because the former are low level functions and
items need not necessarily be unique.  They only need to be unique when
we're actually testing *completions*.
2009-11-25 22:31:29 +01:00
Ville Skyttä
1ff30048fa Add trivial test cases for abook, lftpget, and wtf. 2009-11-03 22:47:35 +02:00
Ville Skyttä
93060b4133 Add k3b completion. 2009-11-03 22:24:41 +02:00
Freddy Vulto
79cffa2d79 (testsuite) Make `configure' test pass 2009-11-02 19:42:03 +01:00
Freddy Vulto
6925ad5081 Mutt fixes
- Added support for `-F configfile'.  This enables using a specially
  crafted muttrc for automated testing.
- Centralized call to _get_cword
- Used _get_pword
- Specified non-wordbreak characters to _get_cword() & _get_pword() for
  bash-4.
- Added automated tests for -f and -A
- Fixed test suite's assert_complete() (test/library.exp) to drop only
  the last element
2009-11-01 10:04:06 +01:00
Freddy Vulto
1be84710d2 Silence completing scp/sftp/ssh -F '' on bash-4
This fixes a bug under bash-4 where completing:

   scp -F 'spaced  conf' <TAB>

causes `dequote' to yield errors:

    bash: eval: line 1: unexpected EOF while looking for matching `''
    bash: eval: line 2: syntax error: unexpected end of file

The bug occurs because of a bug in bash-4.0, where quoted words are split
unintended, see: http://www.mail-archive.com/bug-bash@gnu.org/msg06095.html

Workaround is now to silence `dequote' in case of errors and wait for bash-4 to
be fixed...
2009-10-04 18:14:16 +02:00
Freddy Vulto
d2c6b1ede0 (test suite) Added test for dd
Added test "option should be suffixed with ="
This test exhibits the bug (expected failure) that `dd if<TAB>' gets completed
with `\=' instead of `='.
2009-10-02 16:13:46 +02:00
Freddy Vulto
03526772fa Fixes testsuite:
- Fix get_hosts_avahi() if avahi-browse not available
- Removed test "Tab should complete hostnames" from finger since it's
  returning (for the moment) undetectable ip-addresses from known_hosts
  files.  Furthermore the next test "Tab should complete partial
  hostname" is testing the same.
2009-09-13 18:05:58 +02:00
Freddy Vulto
5999df7fea Merge branch 'master' into fvu 2009-09-13 13:32:14 +02:00
Freddy Vulto
4467ce1725 Fix completion test for dpgk -L 2009-09-12 22:31:10 +02:00
Ville Skyttä
c31daf26ae Fix sbcl file/dirname completion (Debian: #545743). 2009-09-09 18:54:18 +03:00
Freddy Vulto
90fc7be011 Reviewed tests v*, w*, x* & y*
Directories `test/_completion_to_review' &
'lib/completions_to_review' are now removed.
2009-08-01 09:35:24 +02:00
Freddy Vulto
85dd9cd64c Reviewed tests u* 2009-07-31 22:53:30 +02:00
Freddy Vulto
bcd33375ca Reviewed tests t* 2009-07-31 22:18:12 +02:00
Freddy Vulto
567eb37802 Reviewed tests s* 2009-07-31 12:20:51 +02:00
Freddy Vulto
6d31b15011 Fix backwards compatibility calls to _known_hosts
This mimics the old behaviour where you could reuse `_known_hosts()' as
a helper function and pass it `-a' or `-c'.
NOTE: Using `_known_hosts' as a helper function and passing options to
`_known_hosts' is deprecated: Use `_known_hosts_real' instead.
2009-07-25 09:35:03 +02:00
Freddy Vulto
ddb0571227 Reviewed tests q* & r*
Added .swp (vim backup) files to .gitignore
2009-07-24 12:33:30 +02:00
Freddy Vulto
53b1c41c16 Reviewed tests p* 2009-07-24 11:58:02 +02:00
Freddy Vulto
285136a8df Reviewed tests o* 2009-07-24 11:20:38 +02:00
Freddy Vulto
890cadbc3a Reviewed tests n* 2009-07-24 11:16:03 +02:00
Freddy Vulto
0d443835c4 Reviewed tests m* 2009-07-24 09:55:54 +02:00
Freddy Vulto
9bb02ca317 Reviewed tests l* 2009-07-20 21:13:58 +02:00
Freddy Vulto
f1f61ace51 Reviewed tests j* & k* 2009-07-19 14:48:55 +02:00
Freddy Vulto
11302d4038 Reviewed tests h* & i*
Localized `i' variable in `info' completion.
2009-07-18 16:55:23 +02:00
Freddy Vulto
c6af1bf435 Reviewed tests g*
Removed excess parenthesis from gdb completion
2009-07-18 09:43:25 +02:00
Freddy Vulto
22675a60f7 Reviewed tests f* 2009-07-17 23:15:15 +02:00
Freddy Vulto
55bc44b035 Reviewed tests e*
Fixed `assert_complete()' to remove an optional (partial) argument from
`cmd' when expecting `cmd + longestCommonPrefix'.
Added `prompt' argument to procs `assert_bash_exec()' &
`sync_after_int()'
2009-07-17 16:15:02 +02:00
Freddy Vulto
acdf4ca55e (testsuite) Improve `cancel' with dummy print job
A dummy print job is now created (and removed/cancelled) when testing `cancel' completion.
To run the test:

    cd test && ./runCompletion cancel.exp
2009-07-12 21:41:56 +02:00
Freddy Vulto
262c91b486 [testsuite] Improved `match_items()' sorting
`match_items()' now uses bash sort instead of tcl lsort.
The difference in sorting happens because bash and tcl use a different sorting order:
* bash sort uses the current locale's collating sequence and character set
* tcl lsort uses a C-like sort order where each character is sorted according to its numeric value
See also: http://fvue.nl/wiki/Tcl:_Lsort_output_differs_from_bash_sort

This fix allows the `dpkg -L' test to compare all packages.  To run the test:

   ./runCompletion dpkg.exp
2009-07-10 23:08:11 +02:00
Freddy Vulto
c769eeaf8c (testsuite) Centralized tcl function `get_hosts' 2009-06-19 14:56:36 +02:00
Freddy Vulto
49f739a515 Make finger test use new 'assert_complete_partial' 2009-06-19 14:47:34 +02:00
Freddy Vulto
67eedb203f Added ssh completion tests:
- First argument shouldn't complete with commands
- Tab should complete partial hostname

To run the tests: $ cd test && ./runCompletion ssh.exp

Added test library function: assert_complete_partial
2009-06-19 14:23:57 +02:00
Freddy Vulto
043fe4dd4b Reviewed tests d* 2009-06-15 23:17:39 +02:00
Freddy Vulto
881bce9618 Reviewed tests b* & c* 2009-06-14 16:22:25 +02:00
Freddy Vulto
3d723502c9 Reviewed tests a* 2009-06-14 15:20:38 +02:00
Freddy Vulto
ad1b60a3de Refactored xhost & alias completion tests 2009-06-14 13:15:06 +02:00
Freddy Vulto
33118de1f6 Refactored finger test 2009-06-14 12:18:24 +02:00
Freddy Vulto
1f63e21ff5 Fix _user_at_host completion
Fixed _known_hosts_real user completion.
Added test for `finger'.  To execute:

    $ cd test && ./runCompletion finger.exp
2009-06-13 11:34:39 +02:00
Freddy Vulto
0b19577ed9 Added -h HOST option to _known_hosts_real
Modified call to _known_hosts_real in ssh, vncviewer and xhost completions.
2009-06-13 08:38:52 +02:00
Freddy Vulto
67c3ea26e7 Added xhost test
To run the test:

    $ cd test
    $ ./runCompletion xhost.exp
2009-06-12 11:47:28 +02:00
Freddy Vulto
dd5502a920 Upgraded tests for cd and mplayer (and vncviewers) 2009-06-10 00:13:19 +02:00
Freddy Vulto
9e4d9b9653 Moved vncviewer tests out of to_review 2009-06-10 00:00:27 +02:00
Freddy Vulto
22499819a1 Moved 'alias' tests out of 'to_review'.
Directory 'completion_to_review' is now really removed (prefixed with _)
from previous commit.
2009-06-09 23:26:45 +02:00
Freddy Vulto
acfacb0c00 Moved vncviewer tests out of 'to_review' 2009-06-09 23:17:38 +02:00
Freddy Vulto
e847d57e50 Improved test suite from bash-completion-lib
Run the tests with:
$ cd test
$ ./runCompletionUnit
$ ./runCompletionCompletion

The last test of unit/_known_hosts gives UNRESOLVED and needs fixing.
2009-06-09 22:49:53 +02:00