From dfe122966803bea65d7877d7e06e6f5d8af13890 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Tue, 2 Sep 2014 09:08:58 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/8576 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- tests/include.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() -- cgit