226 Commits

Author SHA1 Message Date
Ville Skyttä
c858043cbc Add basic tests for hping2. 2010-06-16 20:34:08 +03:00
Freddy Vulto
94372b2aa6 Merge branch 'use-_get_comp_words_by_ref' 2010-06-10 23:51:30 +02:00
Freddy Vulto
a8dd58cfa9 Added _upvars' and _upvar'.
These helper methods aid in passing variables by reference.
2010-06-09 22:37:02 +02:00
Ville Skyttä
887361302b Split ipsec completion into contrib/ipsec. 2010-06-09 22:50:33 +03:00
Ville Skyttä
3f1f6120d7 Split killall, pkill, pgrep and related completions into contrib/procps. 2010-06-09 22:47:42 +03:00
Ville Skyttä
bf0ec3ce0e Split chown, chgrp, and id completions into contrib/coreutils. 2010-06-09 22:33:25 +03:00
Ville Skyttä
783acae98c (lint) Anchor command start more strictly to avoid false positives. 2010-05-11 00:47:52 +03:00
Ville Skyttä
5022808775 Fix MAC address completion. 2010-05-11 00:35:45 +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ä
e69af25547 Add -context to find(1) options. 2010-05-08 00:18:40 +03:00
Mario Schwalbe
95648c40c5 Update find(1) completion (Alioth: #312491). 2010-05-08 00:10:07 +03:00
Ville Skyttä
0a0d73ff72 (testsuite) Fix cpio -R test on boxes with lots of users. 2010-04-26 23:49:47 +03:00
Ville Skyttä
818995dc2b (testsuite) chsh: test shell completion, fix test on boxes with lots of users. 2010-04-26 23:42:19 +03:00
Ville Skyttä
38e836f82b Fix kldunload test failure when no modules are loaded. 2010-04-26 22:59:15 +03:00
Ville Skyttä
6301ee273b Fix finger test failure when _known_hosts_real returns duplicates. 2010-04-26 21:58:14 +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
Freddy Vulto
59e7d21e09 (testsuite) Fix screen accessing $::BASH_VERSINFO 2010-04-26 19:53:13 +02:00
Freddy Vulto
827ad88ebb (testsuite) Expand PATH with 'sbin' directories
This allows for testing completions of system administrator commands,
which are installed via the same PATH expansion in
`bash_completion.have()'
2010-04-22 22:22:50 +02:00
Ville Skyttä
c5348d8678 Run delegated test tools/scripts with exec. 2010-04-21 23:34:27 +03:00
Ville Skyttä
f9f49786ca Fix running test scripts without giving a path to them.
For example "cd test ; bash runCompletion [...]".
2010-04-21 23:19:34 +03:00
Ville Skyttä
a7cd88bb67 Invoke "run" with the same bash as runCompletion and runUnit are run with.
Makes things a bit easier on systems that don't have bash installed in /bin.
2010-04-21 23:05:13 +03:00
Ville Skyttä
be649e63be Set cancel test outcome to untested, not unresolved if adding a test job fails.
E.g. lp installed, but lpd not running which is not a rare scenario.
2010-04-21 20:30:49 +03:00
Ville Skyttä
1267cf8bd2 Add some more missing basic testcases. 2010-04-21 19:45:33 +03:00
Ville Skyttä
38e9ef18b2 Fix leak of $arg from hcitool and cryptsetup completions. 2010-04-21 19:25:02 +03:00
Ville Skyttä
1017a085a9 Add bunch of missing basic testcases. 2010-04-21 19:20:35 +03:00
Ville Skyttä
807ddd4105 lzma groks *.tlz. 2010-04-21 19:12:05 +03:00
Ville Skyttä
e270eb18e3 Improve filesystem type completions. 2010-04-21 19:07:17 +03:00
Ville Skyttä
7fc1fa88a8 Fix handling of short xz options.
Was broken in 8f42adfa8d5e9fbbba9566d1b76d9f89667e6d98
2010-04-19 21:36:47 +03:00
Ville Skyttä
b19c948a95 Add basic xz tests. 2010-04-19 21:21:19 +03:00
Freddy Vulto
96a936443e (testsuite) Run tests for superuser commands only if command is available
Case was /usr/sbin/grub.
Added check to `assert_source_completions()' if command is really
available for current user.
2010-04-17 08:16:37 +02:00
Ville Skyttä
c89152b6b2 Drop unnecessary $TESTDIR from java -cp test. 2010-04-12 20:39:07 +03:00
Ville Skyttä
79b998442e Run tests based on installed completions, not just command availability.
http://lists.alioth.debian.org/pipermail/bash-completion-devel/2010-February/002556.html
2010-04-12 20:35:16 +03:00
Ville Skyttä
a44c07fb9e Add more iconv option completions, use _split_longopt. 2010-04-11 16:50:10 +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
bdca37a7bf Improve _get_comp_words_by_ref to return words' and cword'
Usage: _get_comp_words_by_ref [OPTIONS] [VARNAMES]
Available VARNAMES:
    cur         Return cur within varname "cur"
    prev        Return prev within varname "prev"
    words       Return words within varname "words"
    cword       Return cword within varname "cword"

Available OPTIONS:
    -n EXCLUDE  Characters out of $COMP_WORDBREAKS which should NOT be
                considered word breaks. This is useful for things like scp
                where we want to return host:path and not only path, so we
                would pass the colon (:) as -n option in this case.  Bash-3
                doesn't do word splitting, so this ensures we get the same
                word on both bash-3 and bash-4.
    -c VARNAME  Return cur within specified VARNAME
    -p VARNAME  Return prev within specified VARNAME
    -w VARNAME  Return words within specified VARNAME
    -i VARNAME  Return words within specified VARNAME

Example usage:

   $ _get_comp_words_by_ref -n : cur prev
2010-03-14 11:07:13 +01: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
0f49bb1e3c (testsuite) Add a --timeout option to test/run to override the default expect timeout. 2010-02-21 05:44:39 +02:00
Crestez Dan Leonard
f9177e5286 (testsuite) Add a --debug-xtrace option to run.
Cleanup test/run scripts and add a --debug-xtrace option.
2010-02-20 22:54:13 +02:00
Ville Skyttä
59977e4bf8 Sync before unsetting var to avoid error message. 2010-02-15 18:56:09 +02: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
91f7e8274e (mount) Handle escapes in LABEL= lines from fstab. 2010-02-15 15:33:10 +02:00
Freddy Vulto
99e550c3a8 (testsuite) fix indent/comment sync_after_int 2010-02-11 23:12:04 +01:00
Freddy Vulto
9f107370c4 (testsuite) Added `sleep .1' after sending QUIT/INT to bash
See also: http://lists.alioth.debian.org/pipermail/bash-completion-devel/2010-February/002566.html
2010-02-11 23:09:46 +01:00
Crestez Dan Leonard
ebdd9cefdc Merge branch 'space-fix': Fix tests when BASH_COMPLETION or TESTDIR contain
spaces.

Conflicts:
	CHANGES
2010-02-09 15:45:40 +02:00
Crestez Dan Leonard
4375c4b94e (mount) Split __linux_fstab_unescape function. Deal with \ at the end of strings. 2010-02-09 15:28:28 +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
c0b77a03f5 (mount) Make it clear that $' strings are not supported 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
Freddy Vulto
2cd91420d2 Merge branch 'fvu' 2010-02-07 15:21:44 +01:00