fix conflicts
This commit is contained in:
commit
b56a8dfaae
4
CHANGES
4
CHANGES
@ -1,4 +1,4 @@
|
||||
bash-completion (1.x)
|
||||
bash-completion (1.1)
|
||||
|
||||
[ David Paleino ]
|
||||
* Permit .gz files concatenation (Debian: #514377)
|
||||
@ -182,7 +182,7 @@ bash-completion (1.x)
|
||||
* Fix leaking $muttcmd from mutt completion
|
||||
* Fix completing multiple hosts (Debian: #535585)
|
||||
|
||||
-- David Paleino <d.paleino@gmail.com> Thu, 18 Jun 2009 13:12:36 +0200
|
||||
-- David Paleino <d.paleino@gmail.com> Sat, 03 Oct 2009 15:41:49 +0200
|
||||
|
||||
bash-completion (1.0)
|
||||
|
||||
|
@ -229,7 +229,7 @@ quote_readline()
|
||||
# This function shell-dequotes the argument
|
||||
dequote()
|
||||
{
|
||||
eval echo "$1"
|
||||
eval echo "$1" 2> /dev/null
|
||||
}
|
||||
|
||||
# Get the word to complete.
|
||||
@ -367,7 +367,7 @@ __get_cword4()
|
||||
|
||||
cur=${cur:$word_start}
|
||||
printf "%s" "$cur"
|
||||
} # _get_cword4()
|
||||
} # __get_cword4()
|
||||
|
||||
|
||||
# This function performs file and directory completion. It's better than
|
||||
|
@ -82,18 +82,55 @@ The test suite requires a connected terminal (tty). When invoked via cron, no t
|
||||
can't read "multipass_name": no such variable
|
||||
---------------------------------------------
|
||||
|
||||
To run the tests successfully via cron, connect a terminal by redirecting stdin from a tty, e.g. /dev/tty50:
|
||||
To run the tests successfully via cron, connect a terminal by redirecting
|
||||
stdin from a tty, e.g. /dev/tty40. (In Linux, you can press alt-Fx or
|
||||
ctrl-alt-Fx to switch the console from /dev/tty1 to tty7. There are many more
|
||||
/dev/tty* which are not accessed via function keys. To be safe, use a tty
|
||||
greater than tty7)
|
||||
|
||||
----------------------
|
||||
./runUnit < /dev/tty50
|
||||
./runUnit < /dev/tty40
|
||||
----------------------
|
||||
|
||||
If the process doesn't run as root, root will have to change the owner and
|
||||
permissions of the tty.
|
||||
If the process doesn't run as root (recommended), root will have to change the
|
||||
owner and permissions of the tty:
|
||||
-------------------------
|
||||
sudo chmod o+r /dev/tty40
|
||||
-------------------------
|
||||
|
||||
In Linux, you can press alt-Fx or ctrl-alt-Fx to switch the console from
|
||||
/dev/tty1 to tty7. There are many more /dev/tty* which are not accessed via
|
||||
function keys. To be safe, use a tty greater than tty7?
|
||||
To start the test at 01:00, set the crontab to this:
|
||||
|
||||
* 1 * * * cd bash-completion/test && ./cron.sh < /dev/tty40
|
||||
|
||||
Here's an example batch file `cron.sh`, to be put in the bash-completion `test`
|
||||
directory. This batch file only e-mails the output of each test-run if the
|
||||
test-run fails.
|
||||
|
||||
[source,bash]
|
||||
---------------------------------------------------------------------
|
||||
#!/bin/sh
|
||||
|
||||
set -e # Exit if simple command fails
|
||||
set -u # Error if variable is undefined
|
||||
|
||||
LOG=/tmp/bash-completion.log~
|
||||
|
||||
# Retrieve latest sources
|
||||
git pull
|
||||
|
||||
# Run tests on bash-3
|
||||
|
||||
./runUnit > $LOG || cat $LOG
|
||||
./runCompletion > $LOG || cat $LOG
|
||||
|
||||
# Run tests on bash-4
|
||||
|
||||
./runUnit --outdir log/bash-4 --tool_exec /opt/bash-4.0/bin/bash > $LOG || cat $LOG
|
||||
./runCompletion --outdir log/bash-4 --tool_exec /opt/bash-4.0/bin/bash > $LOG || cat $LOG
|
||||
|
||||
# Clean up log file
|
||||
[ -f $LOG ] && rm $LOG
|
||||
---------------------------------------------------------------------
|
||||
|
||||
Specifying bash binary
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
0
test/fixtures/evince/foo/.gitignore
vendored
Normal file
0
test/fixtures/evince/foo/.gitignore
vendored
Normal file
0
test/fixtures/kdvi/foo/.gitignore
vendored
Normal file
0
test/fixtures/kdvi/foo/.gitignore
vendored
Normal file
0
test/fixtures/kpdf/foo/.gitignore
vendored
Normal file
0
test/fixtures/kpdf/foo/.gitignore
vendored
Normal file
@ -95,7 +95,24 @@ lappend expected doo: gee: hus: ike: jar:
|
||||
# Append local filenames
|
||||
lappend expected config known_hosts "spaced\\\\ \\\\ conf"
|
||||
set dir fixtures/scp
|
||||
assert_complete_dir $expected "scp -F 'spaced conf' " $dir
|
||||
#assert_complete_dir $expected "scp -F 'spaced conf' " $dir
|
||||
set prompt "/$dir/@"
|
||||
assert_bash_exec "cd $dir" "" $prompt
|
||||
set cmd "scp -F 'spaced conf' "
|
||||
send "$cmd\t"
|
||||
expect -ex "$cmd\r\n"
|
||||
if {[match_items $expected $test]} {
|
||||
expect {
|
||||
-re $prompt { pass "$test" }
|
||||
-re eof { unresolved "eof" }
|
||||
}; # expect
|
||||
} else {
|
||||
# Expected failure (known bug) because of bash-4 bug in quoted words:
|
||||
# http://www.mail-archive.com/bug-bash@gnu.org/msg06095.html
|
||||
if {$bash_versinfo_0 >= 4} {xfail "$test"} {fail "$test"}
|
||||
}; # if
|
||||
sync_after_int $prompt
|
||||
assert_bash_exec "cd \$TESTDIR"
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
@ -48,8 +48,8 @@ set expected [get_hosts]
|
||||
# Hosts `gee', `hus' and `jar' are defined in "./fixtures/scp/spaced conf"
|
||||
# Hosts `doo' and `ike' are defined in ./fixtures/scp/known_hosts
|
||||
lappend expected doo gee hus ike jar
|
||||
set dir fixtures/scp
|
||||
assert_complete_dir $expected "sftp -F 'spaced conf' " $dir
|
||||
set dir fixtures/sftp
|
||||
assert_complete_dir $expected "sftp -F spaced\\ \\ conf " $dir
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
@ -383,7 +383,8 @@ proc match_items {items test {size 20}} {
|
||||
}; # for
|
||||
if {[llength $items] == 1} {
|
||||
expect {
|
||||
-re "^$expected$" { set result true }
|
||||
# NOTE: The optional space ( ?) depends on whether -o nospace is active
|
||||
-re "^$expected ?$" { set result true }
|
||||
"\r\n" { set result false; break }
|
||||
default { set result false; break }
|
||||
timeout { set result false; break }
|
||||
|
Loading…
x
Reference in New Issue
Block a user