From fb86b0b0e35627235c0d15dbfaeb10b3b2ecedc3 Mon Sep 17 00:00:00 2001
From: Simon Rose <simon.rose@ess.eu>
Date: Fri, 18 Jun 2021 10:14:53 +0200
Subject: [PATCH] Removed start/end lines since the error message can appear in
 weird spots

---
 tests/test_versions/test.sh | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/test_versions/test.sh b/tests/test_versions/test.sh
index 76c73578..c43ff763 100755
--- a/tests/test_versions/test.sh
+++ b/tests/test_versions/test.sh
@@ -79,7 +79,7 @@ function test_require {
   iocsh_args="-l test/cellMods -c 'var requireDebug 1' -r $req_str"
 
   if [ "$expected" = "-" ]; then
-    search_string="^Module $MODULENAME (not available|version $required not available|version $required not available \(but other versions are available\))\$"
+    search_string="Module $MODULENAME (not available|version $required not available|version $required not available \(but other versions are available\))"
   else
     search_string="^Loaded $MODULENAME version $expected\$"
   fi
@@ -91,11 +91,9 @@ function test_require {
   # differently than the regular flow of output and sometimes will separate the strings that
   # we are looking for. If we simply cut it out then we seem to be able to more consistently
   # get meaningful tests.
-  #echo exit | eval iocsh.bash "$iocsh_args" |
-  #  sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' |
-  #  $__SEARCH_COMMAND__ "${search_string}"
   echo exit | eval iocsh.bash "$iocsh_args" |
-    sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//'
+    sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' |
+    $__SEARCH_COMMAND__ "${search_string}"
 }
 
 function format_output {
-- 
GitLab