diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-09-02 09:08:58 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-04 09:42:37 -0700 |
commit | dfe122966803bea65d7877d7e06e6f5d8af13890 (patch) | |
tree | b56c2bb455c9a9b09664604eeaa0f8cf1ebfc34c | |
parent | 271cdc1e06c790ecca2a883bc56ebf7992d496fd (diff) |
Regression test portability: EXPECT
Make sure test_expect_not_footer() and test_expect_footer() work on
non empty strings, otherwise it may produce errors such as in pgfid_feat.t
on NetBSD:
not ok 12 Got "" instead of ""
This a a missing bit from previosuly merged patchset:
I9cb76ba863897126534c3808fb0c9e564659835f
BUG: 1129939
Change-Id: I2635b67deec9cf60295faab52e7421947b1f7bda
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8576
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | tests/include.rc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/include.rc b/tests/include.rc index 26f3ee73789..39d824e64ba 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -143,7 +143,11 @@ function _EXPECT() shift; a=$("$@" | tail -1) - test_expect_footer "$e" "$a"; + if [ "x$e" = "x" ] ; then + test_expect_footer "x$e" "x$a"; + else + test_expect_footer "$e" "$a"; + fi } function test_expect_not_footer() |