Skip to content

Commit

Permalink
(test suite): Delete trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 19, 2017
1 parent a9494fe commit ca64e75
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions test/lib/library.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package require textutil::string
# Execute a bash command and make sure the exit status is successful.
# If not, output the error message.
# @param string $cmd Bash command line to execute. If empty string (""), the
# exit status of the previously executed bash command will be
# exit status of the previously executed bash command will be
# checked; specify `title' to adorn the error message.
# @param string $title (optional) Command title. If empty, `cmd' is used.
# @param string $prompt (optional) Bash prompt. Default is "/@"
Expand Down Expand Up @@ -51,7 +51,7 @@ proc assert_bash_exec {{aCmd ""} {title ""} {prompt /@} {out -1}} {
# @param string $command Command to locate
proc assert_bash_type {command} {
set test "$command should be available in bash"
set cmd "type $command &> /dev/null && echo -n 0 || echo -n 1"
set cmd "type $command &> /dev/null && echo -n 0 || echo -n 1"
send "$cmd\r"
expect "$cmd\r\n"
expect {
Expand All @@ -74,7 +74,7 @@ proc assert_bash_type {command} {
# @param list $args Options:
# -sort Compare list sorted. Default is unsorted
# -prompt Bash prompt. Default is `/@'
# -chunk-size N Compare list N items at a time. Default
# -chunk-size N Compare list N items at a time. Default
# is 20.
proc assert_bash_list {expected cmd test {args {}}} {
array set arg [::cmdline::getoptions args {
Expand Down Expand Up @@ -114,7 +114,7 @@ proc assert_bash_list {expected cmd test {args {}}} {
# @param list $args Options:
# -sort Compare list sorted. Default is unsorted
# -prompt Bash prompt. Default is `/@'
# -chunk-size N Compare list N items at a time. Default
# -chunk-size N Compare list N items at a time. Default
# is 20.
proc assert_bash_list_dir {expected cmd dir test {args {}}} {
array set arg [::cmdline::getoptions args {
Expand All @@ -126,7 +126,7 @@ proc assert_bash_list_dir {expected cmd dir test {args {}}} {
if {$arg(sort)} {set arg_sort "-sort"} else {set arg_sort ""}
assert_bash_exec "cd $dir" "" $prompt
assert_bash_list $expected $cmd $test $arg_sort \
-chunk-size $arg(chunk-size) -prompt $prompt
-chunk-size $arg(chunk-size) -prompt $prompt
sync_after_int $prompt
assert_bash_exec {cd "$TESTDIR"}
}
Expand Down Expand Up @@ -373,7 +373,7 @@ proc assert_complete_dir {expected cmd dir {test ""} {args {}}} {
sync_after_int $prompt
assert_bash_exec {cd "$TESTDIR"}
}



# Make sure a partial argument is completed.
Expand Down Expand Up @@ -408,7 +408,7 @@ proc assert_complete_partial {expected cmd {partial ""} {test ""} {args {}}} {


# If cword contains colon (:), left-trim completions with cword
# @param string $cmd Command to complete
# @param string $cmd Command to complete
# @param list $items Reference to list of completions to trim
# @param string $dword Reference to variable to contain word to remove from
# expected cmd.
Expand Down Expand Up @@ -445,13 +445,13 @@ proc _ltrim_colon_completions {cmd items dword} {
# to `save_env()'.
# @param string $sed Sed commands to preprocess diff output.
# Example calls:
#
#
# # Replace `COMP_PATH=.*' with `COMP_PATH=PATH'
# assert_env_unmodified {s/COMP_PATH=.*/COMP_PATH=PATH/}
#
#
# # Remove lines containing `OLDPWD='
# assert_env_unmodified {/OLDPWD=/d}
#
#
# @param string $file Filename to generate environment save file from. See
# `gen_env_filename()'.
# @param string $diff Expected diff output (after being processed by $sed)
Expand Down Expand Up @@ -488,8 +488,8 @@ proc assert_env_unmodified {{sed ""} {file ""} {diff ""}} {

expect {
-re "^$diff[wd]@$" { pass "$test" }
-re [wd]@ {
fail "$test"
-re [wd]@ {
fail "$test"

# Show diff to user

Expand Down Expand Up @@ -696,7 +696,7 @@ proc init_tcl_bash_globals {} {
# @return boolean True (1) if completion is installed, False (0) if not.
proc is_bash_completion_installed_for {command} {
set test "$command should have completion installed in bash"
set cmd "complete -p $command &> /dev/null && echo -n 0 || echo -n 1"
set cmd "complete -p $command &> /dev/null && echo -n 0 || echo -n 1"
send "$cmd\r"
expect "$cmd\r\n"
expect {
Expand All @@ -716,7 +716,7 @@ proc is_cygwin {} {

# Expect items, a limited number (20) at a time.
# Break items into chunks because `expect' seems to have a limited buffer size
# @param list $items Expected list items
# @param list $items Expected list items
# @param list $args Options:
# -bash-sort Compare list bash-sorted. Default is
# unsorted
Expand Down Expand Up @@ -994,7 +994,7 @@ proc init_bash_xtrace {{fname xtrace.log}} {


# Setup test environment
#
#
# Common initialization for unit and completion tests.
proc start_interactive_test {} {
start_bash
Expand Down

0 comments on commit ca64e75

Please sign in to comment.