Freddy Vulto 262c91b486 [testsuite] Improved `match_items()' sorting
`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
2009-07-10 23:08:11 +02:00

33 lines
590 B
Plaintext

proc setup {} {
save_env
}; # setup()
proc teardown {} {
assert_env_unmodified
}; # teardown()
setup
assert_complete_any "dpkg --c"
sync_after_int
# Build list of installed packages
# NOTE: If an argument is passed to `--get-selections', `dpkg' also returns
# packages with status "purged". Be sure to add `| grep install$' to
# pipeline before 'cut' in that case. -- FVu, Sun Feb 22 10:08:34 CET 2009
if {[assert_exec {dpkg --get-selections | cut -f1} packages]} {
assert_complete $packages "dpkg -L "
}; # if
sync_after_int
teardown