Skip to content

Commit

Permalink
test(windows): adapt test cases to Windows
Browse files Browse the repository at this point in the history
- "ExtComm_1" requires Unix.
- "Sta_Fill_1" is pending on Windows.
- "AppendPath" and "TempSortDir" are divided into Unix and Windows cases
  because off the different path separators.
  • Loading branch information
tueda committed Jan 24, 2025
1 parent e5371fc commit 853698c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
2 changes: 2 additions & 0 deletions check/examples.frm
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ assert result("G") =~ expr("
Local F = B(1);
Print;
.end
#pend_if windows?
assert finished?
assert warning?
*--#] Sta_Fill_1 :
Expand Down Expand Up @@ -1813,6 +1814,7 @@ Local aPLUSbTO3=

Print;
.end
#require unix?
# This gives Valgrind errors (3 memory leaks) on Travis CI
# (osx-gcc-valgrind-parvorm), but cleanly works on Linux with mpich 3.2.
# Might be an OS- or implementation-specific bug.
Expand Down
50 changes: 46 additions & 4 deletions check/features.frm
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ assert result("F2") =~ expr("0")
assert result("F3") =~ expr("0")
assert result("F4") =~ expr("0")
*--#] partitions_ :
*--#[ AppendPath :
*--#[ AppendPath_unix :
#include foo/foo1.h
* foo/bar/p1.prc
#call p1
Expand All @@ -238,6 +238,36 @@ P;
#call p1
P;
.end
#require unix?
#prepare write "foo/foo1.h", "#prependpath bar\n"
#prepare write "foo/foo2.h", "#appendpath bar\n"
#prepare write "foo/bar/p1.prc", "#procedure p1()\nL F=1234;\n#endprocedure\n"
#prepare write "foo/bar/p2.prc", "#procedure p2()\nL G=5678;\n#endprocedure\n"
#prepare write "bar/p1.prc", "#procedure p1()\nL H=9012;\n#endprocedure\n"
assert succeeded?
assert result("F") =~ expr("1234")
assert result("G") =~ expr("5678")
assert result("H") =~ expr("9012")
*--#] AppendPath_unix :
*--#[ AppendPath_windows :
#include foo\foo1.h
* foo/bar/p1.prc
#call p1
P;
.end
#:path foo;bar
#include foo1.h
* foo/bar/p2.prc
#call p2
P;
.end
#:path foo;bar
#include foo2.h
* bar/p1.prc
#call p1
P;
.end
#require windows?
#prepare write "foo/foo1.h", "#prependpath bar\n"
#prepare write "foo/foo2.h", "#appendpath bar\n"
#prepare write "foo/bar/p1.prc", "#procedure p1()\nL F=1234;\n#endprocedure\n"
Expand All @@ -247,7 +277,7 @@ assert succeeded?
assert result("F") =~ expr("1234")
assert result("G") =~ expr("5678")
assert result("H") =~ expr("9012")
*--#] AppendPath :
*--#] AppendPath_windows :
*--#[ TimeoutAfter_1 :
#procedure problematicprocedure
* Do nothing.
Expand Down Expand Up @@ -1089,13 +1119,25 @@ format C;
assert succeeded?
assert !(file("out.c") =~ /[_] [+]= /)
*--#] Issue392_ContinuationLines_0 :
*--#[ TempSortDir :
*--#[ TempSortDir_unix :
#: TempSortDir bad/path
Local test = 1;
.end
#require unix?
if mpi?
assert runtime_error?("Could not create sort file: bad/path/0formxxx.sor")
else
assert runtime_error?("Could not create sort file: bad/path/xformxxx.sor")
end
*--#] TempSortDir :
*--#] TempSortDir_unix :
*--#[ TempSortDir_windows :
#: TempSortDir bad_path
Local test = 1;
.end
#require windows?
if mpi?
assert runtime_error?('Could not create sort file: bad_path\0formxxx.sor')
else
assert runtime_error?('Could not create sort file: bad_path\xformxxx.sor')
end
*--#] TempSortDir_windows :

0 comments on commit 853698c

Please sign in to comment.