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()'
Some tests failed with label `failed', which is incorrect because the
completions just weren't installed. Completions weren't installed
because the commands to complete weren't installed.
Fixed so that if commands aren't available, the tests fail with label
`unsupported'.
The local timeout settings `-timeout 1' in some loops seemed to cause
inpredictable results, e.g. with `./runCompletion dkpg.exp' since this
test has a long list to match. Sometimes the `spawn_id' was gone before
the `teardown' method was called.
Removing the short timeout seems to give more predictable results.
Fix `assert_complete' to expect the longest common prefix to be presented as completion.
When trying to do a:
package require textutil::string
it appeared DejaGnu overwrites `unknown', the tcl function that is called to attempt autoloading. A workaround is used for tcl auto-loading to work: `init.tcl' is reloaded to restore the original `unknown' function:
source [file join [info library] init.tcl]
See also: http://fvue.nl/wiki/DejaGnu:_proc_"tclPkgUnknown_..."_does_not_exist
`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
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
The original call to avahi-browse also had "-k", to avoid
lookups into avahi's services DB. We don't need the name
of the service, and if it contains ";", it may mistify
the result. But on Gentoo (at least), -k isn't available
(even if mentioned in the manpage), so...
- 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