test-lib: Avoid empty line in diff when no completion.
There should be a trailing newline when there are completions (to avoid diff complaining about "no trailing newline", but not when there are no completions at all.
This commit is contained in:
@@ -660,8 +660,8 @@ test_todo_completion () {
|
||||
_todo
|
||||
|
||||
IFS=$'\n'
|
||||
printf '%s\n' "${EXPECT[*]}" > expect
|
||||
printf '%s\n' "${COMPREPLY[*]}" > output
|
||||
printf "%s${EXPECT:+\\n}" "${EXPECT[*]}" > expect
|
||||
printf "%s${COMPREPLY:+\\n}" "${COMPREPLY[*]}" > output
|
||||
IFS=$SAVEIFS
|
||||
|
||||
if [ ${#COMPREPLY[@]} -eq ${#EXPECT[@]} ]
|
||||
|
||||
Reference in New Issue
Block a user