37 Commits

Author SHA1 Message Date
Freddy Vulto
6feb44ac0f (testsuite) Add missing dir to fixtures/acroread 2010-11-13 09:30:26 +01:00
Freddy Vulto
c86b336769 (testuite) Fix tests to run with autotools' make distcheck
File locations are prefixed with `$::srcdir' so that `make distcheck' can
execute the test suite using a relative path.

The current working directory is removed from the test-suite-bash-prompt.

Furthermore, no more dynamic creation of files in dir $::srcdir/fixtures since
this dir is read-only during `make distcheck'.  Instead create dynamic files in
$TESTDIR/tmp

The test suite uses these "directory" variables

   tcl            bash          description
   ------------   -----------   ------------------------------------
   $::srcdir      $SRCDIR       where `fixtures' reside, relative
   $::srcdirabs   $SRCDIRABS    where `fixtures' reside, absolute
   $::TESTDIR     $TESTDIR      where `runtest' is invoked, absolute
2010-11-12 23:35:36 +01:00
Ville Skyttä
0f3a7ff2a5 Make man completion work with manpage names containing colons.
For example Perl module man pages often contain them.  While at it,
add a couple of unrelated man test cases.
2010-10-23 23:03:05 +03:00
Ville Skyttä
1da64f602a More known hosts IPv6 completion fixes, thanks to Yoshinori KUNIGA.
https://bugzilla.redhat.com/show_bug.cgi?id=630658#c4
2010-10-04 21:31:03 +03:00
Ville Skyttä
9341a1131c Fix known hosts completion for IPv6 addresses whose last 16 bits are digits (Alioth: #312695, RedHat: #630658). 2010-09-28 18:24:35 +03:00
Ville Skyttä
7f5c64e580 (testsuite) Add some [host]:port cases to known hosts related tests. 2010-09-28 17:59:31 +03:00
Ville Skyttä
c183a585b2 Match uppercased versions of _filedir and _filedir_xspec arguments too.
This provides a bit of case insensivity to file extension matching,
allowing for example _filedir foo to match both *.foo and *.FOO.  Note
that this is not real case insensivity; mixed case extensions like
*.FOO.gz are not matched by _filedir foo.gz so those need to be
handled like before this change.
2010-09-19 12:12:06 +03:00
Ville Skyttä
310eb69245 Add wol(1) completion.
May need a bit of work, see failing test case ("wol 00:").
2010-05-10 00:57:16 +03:00
Ville Skyttä
9c9df7f2b7 Add pkgtools fixture, test port{upgrade,install} and pkg_deinstall against it. 2010-04-26 21:36:04 +03:00
Ville Skyttä
7fc1fa88a8 Fix handling of short xz options.
Was broken in 8f42adfa8d5e9fbbba9566d1b76d9f89667e6d98
2010-04-19 21:36:47 +03:00
Freddy Vulto
3d4941fa96 (testsuite) Add test case for _filedir with directory containing multibyte character.
See also: http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01942.html
2010-04-10 12:13:33 +02:00
Freddy Vulto
86ce86cb34 (testsuite) Add empty fixture directory 2010-03-13 09:10:31 +01:00
Freddy Vulto
caaf58859a Undo commit 00560a88 ("_filedir: bash > 4 has the same behaviour
regardless of $cur beginning with ' or not"), because this is failing
tests:

    FAIL: completing f a\'b/ should return i
    FAIL: completing f a\"b/ should return i
    FAIL: f a\$b/ should show completions
    FAIL: f a\\b/ should show completions
    FAIL: completing f2 a\'b/ should return i
    FAIL: completing f2 a\"b/ should return i
    FAIL: f2 a\$b/ should show completions
    FAIL: f2 a\\b/ should show completions

- Fix _filedir to check for availability of COMP_WORDS (_filedir runs from
  within a completion instead of the command line) when doing a `complete -p
  ${COMP_WORDS[0]'
- Fix _filedir usage comment
- Enhanced _filedir tests
- Added _filedir test "completing with filter '.e1' should show completions"
2010-03-12 13:41:53 +01:00
Crestez Dan Leonard
f294219990 Merge branch 'mount-fix'
Fix mount handling of escapes (Alioth: #311410, Launchpad: #219971)

Conflicts:
	CHANGES
2010-02-15 15:36:58 +02:00
Crestez Dan Leonard
2f61acd068 (mount) Make mount work properly with ' in fstab 2010-02-09 15:28:28 +02:00
Crestez Dan Leonard
6e0dc07ee2 (mount) Cleanup mount tests and test-fstab; fix obvious errors. 2010-02-09 15:28:13 +02:00
Ville Skyttä
35ebc8aec8 (testsuite) Add lftp hostname completion testing fixture. 2010-02-05 22:19:34 +02:00
Freddy Vulto
dc4d28bc11 (testsuite) mv fixture1 fixtures/shared/default 2010-02-05 15:16:19 +01:00
Crestez Dan Leonard
bfb55ddf32 (testsuite) mount.exp: Create a mount-line completion which reads from a file instead of global fstab. 2010-02-04 19:02:18 +02:00
Ville Skyttä
050fb91d40 (testsuite) Add some java classpath tests. 2010-01-30 12:25:13 +02:00
Ville Skyttä
89e52de0c5 (testsuite) Fix cvsps non-option completion test, add test for options.
"cvsps " completion failed when there was nothing in ~/.cvspass,
create a fixture for generic cvs use containing one, and use it.
2010-01-24 23:32:19 +02:00
Leonard Crestez
c5951118e9 Fix NFS mounts completion (Alioth: #312285). 2010-01-24 19:27:15 +02:00
Freddy Vulto
f321c377af (testsuite) Delete directory fixtures/_filedir/a\b
Directories `a\b' and `a*b' are now created run-time on a
non-Cygwin/Windows system only.  Tests concerning these directories will
also be run only on a non-Cygwin/Windows system.
(Alioth #312191)
2009-12-30 14:48:17 +01:00
Freddy Vulto
c9c98da36e Fixed `quote_readline'.
This fixes completing filenames containing single quote (') on bash-4.

Also added emulation of `-o filenames' to _filedir.

Added tests for _filedir.

Fixed array assignment within __reassemble_comp_words_by_ref().
2009-12-24 10:00:29 +01:00
Freddy Vulto
a07b5c5ffd Fix expanding quoted tilde in _known_hosts_real.
- Added unit test "Files starting with tilde (~) should work" to
  unit/_known_hosts_real.exp
2009-11-29 14:42:42 +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
9c53f0d6e6 (testsuite) Added empty directories to git
Empty directories are ignored by git.  By putting an empty .gitignore in
the directory, the directory can be added to git.
2009-10-03 09:39:55 +02:00
Freddy Vulto
b66425e8cf (testsuite) Remove test with non-portable filenames
Files containing a star (*) aren't support on FAT, thus Cygwin.
Closes Alioth #311979.
2009-09-25 20:28:00 +02:00
Freddy Vulto
de585f387d Fix _known_hosts_real() to not glob awk script
See also bugreport Alioth #311614.

Added tests for the awk script processing IP numbers.  To run the tests:

   cd test
   ./runUnit _known_hosts_real.exp
   ./runCompletion ssh.exp scp.exp sftp.exp
2009-09-04 23:08:56 +02:00
Freddy Vulto
31f03cfb82 Fix for known_host files containing * character
Quote sed output ("\1") retrieving "GlobalKnownHostsFile/UserKnownHostsFile" to
prevent bash globbing of special characters, e.g. '*'.

Added unit test "Config file containing star (*) should work".
Added test library function `assert_bash_list()'.
To run unit tests:

    cd test && ./runUnit _known_hosts_real.exp
2009-08-23 09:38:19 +02:00
Freddy Vulto
567eb37802 Reviewed tests s* 2009-07-31 12:20:51 +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
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
3fe193f81a Fix completing multiple hosts (Debian: #535585)
Fixed `_known_hosts_real' to allow for multiple patterns in ssh config, e.g.:

    Host foo.example.net bar.example.net

IFS was set to just newline (\n), whereas `compgen -W' relies on IFS
being space-tab-newline ( \t\n) to expand hostnames which are separated
by whitespace.
Tests are updated as well (added host `jar' to config).  To run the tests:

    ./runUnit _known_hosts_real.exp
2009-07-07 23:05:03 +02:00
Freddy Vulto
b1d869cbf2 Renamed unit test _known_hosts > _known_hosts_real 2009-06-13 08:42:22 +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