2170 Commits

Author SHA1 Message Date
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ä
7ef06fb2df Add break, lock, say, and state to perldoc -f completions. 2010-02-17 20:03:21 +02:00
Ville Skyttä
d7d8b2b206 Include *.pl, *.pm, and *.pod files in perldoc completions. 2010-02-17 19:57:32 +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
Crestez Dan Leonard
6d44b8033a (umount) Parse /proc/mounts instead of mount output on Linux
This makes it possible to easily unmount paths with spaces. Those are common
when automatically mounting usb devices.
2010-02-15 14:20:37 +02:00
Ville Skyttä
72a8cb5b49 Add -H, -L, and -P to chown and chgrp option completions with -R/--recursive. 2010-02-12 17:52:56 +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
Crestez Dan Leonard
1c4b461882 (mount) Fix leaking fs_* vars to the environment. Explicitly save/restore IFS to be posix conformant. 2010-02-09 15:18:19 +02:00
Ildar Mulyukov
6b30acc9ac bind *.ltx files to LaTeX family of programs
according to user request https://bugzilla.altlinux.org/show_bug.cgi?id=22443
2010-02-08 22:14:15 +02:00
Freddy Vulto
2cd91420d2 Merge branch 'fvu' 2010-02-07 15:21:44 +01:00
Freddy Vulto
b529cee550 Added _get_comp_words_by_ref()
This solves the following problems:
- now one function call suffices instead of two (_get_cword; _get_pword) if
  subsequent words need to be retrieved.  Also more than two words can be
  retrieved at once, e.g.: _get_comp_words_by_ref cur prev prev2 prev3
  Also this prevents passing of `wordbreakchars' to differ in calls to
  `_get_cword' and `_get_pword', e.g.: _get_comp_words_by_ref -n : cur prev
- passing by reference, no subshell call necessary anymore
- _get_pword now also takes into account the cursor position

Added testsuite proc `assert_no_output()'

Word of caution:

The passing-arguments-by-ref system in bash doesn't work if the new variable is
also declared local.  For example:

    t() {
        local a
        # ...
        eval $1=b
    }
    a=c; t a; echo $a  # Outputs "c", should be "b"
                       # Variable "a" is 'forbidden'

To make name collissions like this less likely to happen, but make the real
function still use readable variables, I've wrapped the `*_by_ref'
functions within an additional layer using variables prefixed with double
underscores (__).  For example:

    _t() {
        # Readable variables can still be used here
        local a
        # ...
        eval $1=b
    }
    t() {
        local __a
        _t __a
        eval $1=\$__a
    }
    a=c; t a; echo $a  # Outputs "b"
                       # Variable "__a" is 'forbidden'

Now only more obfuscated variables (starting with double prefix (__)) are
forbidden to use.
2010-02-07 15:18:58 +01:00
Crestez Dan Leonard
c72e20b42f Merge branch 'find-unique-completion-pair' 2010-02-07 01:09:17 +02:00
Ville Skyttä
6810e55645 (testsuite) Fix chown basic user completion test on systems with lots of users. 2010-02-05 22:44:04 +02:00
Ville Skyttä
35ebc8aec8 (testsuite) Add lftp hostname completion testing fixture. 2010-02-05 22:19:34 +02:00
Ville Skyttä
44f7ea3c5b Line length: 72 -> 79 as discussed on list. 2010-02-05 21:48:47 +02:00
Freddy Vulto
dc4d28bc11 (testsuite) mv fixture1 fixtures/shared/default 2010-02-05 15:16:19 +01:00
Freddy Vulto
c70c1ecb31 (testsuite) Added helper functions
- assert_source_completions()
- is_bash_completion_installed_for()

This allows for cleaner invocation of tests in `lib/completions/'.  For
example, `completion/perldoc.exp' now just contains:

    assert_source_completions perldoc

Skeleton test files for a command can be generated with:

    $ ./generate <command>
2010-02-05 14:35:45 +01:00
Freddy Vulto
8aca9ab62d (doc) Add reference to Tcl Style Guide. 2010-02-05 11:39:23 +01:00
Freddy Vulto
b9413e4151 (testsuite) Updated documentation
Added explanation about the two-file system: `completion/*.exp
calling completions in lib/completions/*.exp
2010-02-05 10:03:18 +01:00
Freddy Vulto
9b9bbab1ff (testsuite) Fix ssh test
Fix ssh test "First argument shouldn't complete with commands" if one
has hosts starting with "bas" in known hosts. (Alioth #312292)
2010-02-05 08:45:44 +01:00
Crestez Dan Leonard
b493869b8d _reply_compgen_array: Fix leaking to environment 2010-02-04 19:18:14 +02: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
Crestez Dan Leonard
1096dadc26 Separate _linux_fstab function 2010-02-04 16:47:44 +02:00
Crestez Dan Leonard
800453c30e Changes line 2010-02-04 16:40:27 +02:00
Crestez Dan Leonard
99b289474e Initial implementation of _reply_compgen_array 2010-02-04 16:31:51 +02:00
Crestez Dan Leonard
dc18aae4e4 Add changes entry for Alioth #312306 2010-02-04 15:22:04 +02:00
Crestez Dan Leonard
ce624f7983 Use find_unique_completion_pair in chown test 2010-02-03 14:09:31 +02:00
Crestez Dan Leonard
2ad9001556 Add a find_unique_completion_pair proc.
Given a list of items this proc finds a (part, full) pair so that when
completing from $part $full will be the only option.
2010-02-03 14:08:55 +02:00
David Paleino
6663709d76 docs: styleguide, establish line wrapping and $() instead of `` 2010-02-02 19:02:26 +01:00
Crestez Dan Leonard
aac11de466 Fix nfs mount completion if the path to showmount contains a space. 2010-02-02 11:17:33 +02:00
Crestez Dan Leonard
c3bb4416d7 Fixed tests when BASH_COMPLETION or TESTDIR contain spaces. 2010-02-02 11:16:29 +02:00
Leonard Crestez
61f83856fb (testsuite) Fix chown test "crash" if root user/group is N/A (Alioth: 312306). 2010-02-01 21:29:47 +02:00
Freddy Vulto
d358036572 (testsuite) Fix assert_bash_type perldoc > perl
Make `assert_bash_type' reflect bash-side where `have perl' is checked,
and not perldoc, to determine whether `perldoc' completion should be
installed.
2010-01-31 11:37:29 +01:00
Ville Skyttä
db9c42340c (testsuite) Sync fmt test with other longopt only tests. 2010-01-30 15:04:02 +02:00
Ville Skyttä
8f4111d5a4 (testsuite) Don't fail long option tests if command has no long options.
Many basic commands do not have long options on non-GNU systems, mark such
tests as unsupported (if the command doesn't respond to --help) instead of
failing.

Implemented with the new $failcmd parameter to assert_exec().
2010-01-30 14:56:39 +02:00
Ville Skyttä
c5470fdf74 Simplify java classes-in-classpath-dirs completion.
We intentionally don't look into subdirs of dirs in classpath
(Debian: #496828) so a plain "ls" instead of "find" with non-portable
-maxdepth is fine.
2010-01-30 12:41:54 +02:00
Ville Skyttä
b996ff01cb (testsuite) Add java -jar test. 2010-01-30 12:36:29 +02:00
Ville Skyttä
050fb91d40 (testsuite) Add some java classpath tests. 2010-01-30 12:25:13 +02:00
Ville Skyttä
f62a4ad7b2 Indentation fixes. 2010-01-30 12:22:33 +02:00
Freddy Vulto
1061876bbc Merge branch 'fvu' 2010-01-29 23:24:58 +01:00
Freddy Vulto
d866854066 Fix _usergroup, cpio and chown completions
Improve test suite.
Thanks to Leonard Crestez (Alioth: #311396, Debian: #511788).

`assert_complete' is improved.  It proved difficult to tell tcl to ignore
backslash escapes, e.g. the `\b' is no BACKSPACE but a literal `b'.  The added
function `split_words_bash' should to the trick now.

Added function `assert_no_complete' which can also be reached by calling
`assert_complete' with an empty `expected' argument:

    assert_complete "" qwerty
2010-01-29 23:23:30 +01:00