12 Commits

Author SHA1 Message Date
Ville Skyttä
6589a0d61b Drop support for bash < 4.1, clean up no longer needed low hanging cruft. 2011-04-21 12:20:59 +03:00
Ville Skyttä
360b3dbe19 (testsuite) Indentation fixes. 2010-01-03 15:56:00 +02:00
Ville Skyttä
ec3227366a (testsuite) Make diff_env() compatible with Solaris sed.
It appears to tolerate comments only at beginning of line.
2010-01-03 15:42:32 +02:00
Freddy Vulto
08c5878483 Merged __get_cword3 & __get_cword4 to _get_cword
Actually enhanced __get_cword3 to _get_cword, and removed __get_cword4.
__get_cword4 could handle chars to exclude from COMP_WORDBREAKS, but
failed with partial quoted arguments (e.g. "a 'b c|", | = cursor
position).  This was no problem till bash-4.0.35, because bash < 4.0.35
also returned partial quoted arguments incorrectly.  See also:
http://www.mail-archive.com/bug-bash@gnu.org/msg06094.html

Now that bash-4.0.35 returns quoted arguments ok, __get_cword3 is
enhanced to also handle chars to exclude from COMP_WORDBREAKS.  Because
__get_cword3 also handles partial quoted arguments correctly, this makes
__get_cword3 suitable for bash-4 as well.
2009-12-06 23:16:31 +01:00
Ville Skyttä
4790b1a0c6 sed usage portability fixes: avoid \+ 2009-11-03 22:04:46 +02:00
Freddy Vulto
a55d311ae2 (testsuite) Moved unsetting COMPREPLY 2009-10-31 08:32:58 +01:00
Freddy Vulto
820b7c2602 (testsuite) Fix _known_hosts_real
Clear COMPREPLY after test now that _known_hosts_real is appending
instead of setting COMPREPLY.
2009-10-30 17:18:43 +01:00
Guillaume Rousse
506e1cb3eb new indentation policy 2009-10-04 19:42:50 +02:00
Ville Skyttä
369980bf93 Tell *Emacs to indent comments (sh-indent-comment: t).
Also move indentation settings to end of files and expand *Emacs ones to
local variables block to avoid overflowing 80 char lines.
2009-10-01 20:54:51 +03:00
Freddy Vulto
c6a8b856de (testsuite) set +o history for bash < 3.2.41
Bash < 3.2.41 has a bug where 'history' disappears from SHELLOPTS
whenever a shopt setting is sourced or eval'ed.  Disabling 'history'
makes it not show in tests "Environment should not be modified"
for bash < 3.2.41.
Added helper function `is_bash_version_minimal()' to
test/lib/library.sh.
2009-09-16 22:05:23 +02:00
Freddy Vulto
567eb37802 Reviewed tests s* 2009-07-31 12:20:51 +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