Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
completion: standardize final space marker in tests
author
Felipe Contreras
<felipe.contreras@gmail.com>
Sun, 11 Nov 2012 14:35:54 +0000
(15:35 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 16 Nov 2012 18:57:52 +0000
(10:57 -0800)
The rest of the code uses ' Z$'. Lets use that for
test_completion_long() as well.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9902-completion.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
701ecdf
)
diff --git
a/t/t9902-completion.sh
b/t/t9902-completion.sh
index 5c06709ea0601a26485c8503b4a91e645ec18226..9778a1b94d46c2083d5ecf297fc003d6381af2c1 100755
(executable)
--- a/
t/t9902-completion.sh
+++ b/
t/t9902-completion.sh
@@
-66,11
+66,10
@@
test_completion ()
}
# Like test_completion, but reads expectation from stdin,
}
# Like test_completion, but reads expectation from stdin,
-# which is convenient when it is multiline. We also process "_" into
-# spaces to make test vectors more readable.
+# which is convenient when it is multiline.
test_completion_long ()
{
test_completion_long ()
{
-
tr _ " "
>expected &&
+
sed -e 's/Z$//'
>expected &&
test_completion "$1"
}
test_completion "$1"
}
@@
-252,24
+251,24
@@
test_expect_success 'setup for ref completion' '
test_expect_success 'checkout completes ref names' '
test_completion_long "git checkout m" <<-\EOF
test_expect_success 'checkout completes ref names' '
test_completion_long "git checkout m" <<-\EOF
- master
_
- mybranch
_
- mytag
_
+ master
Z
+ mybranch
Z
+ mytag
Z
EOF
'
test_expect_success 'show completes all refs' '
test_completion_long "git show m" <<-\EOF
EOF
'
test_expect_success 'show completes all refs' '
test_completion_long "git show m" <<-\EOF
- master
_
- mybranch
_
- mytag
_
+ master
Z
+ mybranch
Z
+ mytag
Z
EOF
'
test_expect_success '<ref>: completes paths' '
test_completion_long "git show mytag:f" <<-\EOF
EOF
'
test_expect_success '<ref>: completes paths' '
test_completion_long "git show mytag:f" <<-\EOF
- file1
_
- file2
_
+ file1
Z
+ file2
Z
EOF
'
EOF
'
@@
-278,7
+277,7
@@
test_expect_success 'complete tree filename with spaces' '
git add . &&
git commit -m spaces &&
test_completion_long "git show HEAD:nam" <<-\EOF
git add . &&
git commit -m spaces &&
test_completion_long "git show HEAD:nam" <<-\EOF
- name with spaces
_
+ name with spaces
Z
EOF
'
EOF
'
@@
-287,8
+286,8
@@
test_expect_failure 'complete tree filename with metacharacters' '
git add . &&
git commit -m meta &&
test_completion_long "git show HEAD:nam" <<-\EOF
git add . &&
git commit -m meta &&
test_completion_long "git show HEAD:nam" <<-\EOF
- name with ${meta}
_
- name with spaces
_
+ name with ${meta}
Z
+ name with spaces
Z
EOF
'
EOF
'