update graphml tests

This commit is contained in:
Alexey Fedoseev
2024-04-14 11:30:51 +03:00
parent f2a84f403a
commit 99bf4912cd
7 changed files with 269 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ echo
for t in $(ls tests/*.test); do
num=$(echo $t | grep -Poe '\d+')
echo -n "$num $t... "
if [ -f "tests/$num-input.graphml" ]
if [ -f "$t-input.graphml" ]
then
$t > "$t.txt"
else
@@ -28,7 +28,7 @@ for t in $(ls tests/*.test); do
fi
if [ -f "tests/$num-output.graphml" ]
then
diff "$t.graphml" "tests/$num-output.graphml" >/dev/null
diff "$t.graphml" "tests/$num-output.graphml"
if [ $? != 0 ]
then
echo "test failed: graphml file didn't match the pattern!"
@@ -37,7 +37,7 @@ for t in $(ls tests/*.test); do
fi
if [ -f "tests/$num-output.txt" ]
then
diff "$t.txt" "tests/$num-output.txt" >/dev/null
diff "$t.txt" "tests/$num-output.txt"
if [ $? != 0 ]
then
echo "test failed: output didn't match the pattern!"