diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-30 14:39:14 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-30 19:50:48 +0000 |
commit | cd50f9c3ca13efec84cc82fc20798e883fa6ba97 (patch) | |
tree | 54199796c482c3553af19c0e04ccad204c3dc369 | |
parent | 4ef9b0ee8c0e7dd58fab89ad4ec7b660f2ab7e0f (diff) |
Test suite: Make t-refs-same* not wrongly ignore some nonexistent refs
Previously, t_ref_val="" was meant to mean "no refs specified yet" but
could also arise from "ref was specified but did not exist".
Distinguish these two cases, by using t_ref_val="" to mean only the
latter. "No refs specified yet" is represented as t_ref_val unset.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | tests/lib | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -489,8 +489,8 @@ t-ref-head () { t-ref-same-val () { local name="$1" local val=$2 - case "$t_ref_val" in - '') ;; + case "${t_ref_val-unset}" in + unset) ;; "$val") ;; *) fail "ref varies: $name:\ ${val:-nothing} != ${t_ref_val:-nothing}" ;; @@ -499,7 +499,7 @@ t-ref-same-val () { } t-refs-same-start () { - t_ref_val='' + unset t_ref_val } t-refs-same () { |