From 7524064908de828053d3ca9ee93b88b20b2dd458 Mon Sep 17 00:00:00 2001 From: Akshar Patel Date: Fri, 15 Mar 2024 17:59:24 +0000 Subject: [PATCH] Add second expected file for ABC test --- ABC/tests/bear-fuzzy-wuzzy/ABC.expected2 | 6 ++++++ ABC/tests/bear-fuzzy-wuzzy/ABCtest.bats | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 ABC/tests/bear-fuzzy-wuzzy/ABC.expected2 diff --git a/ABC/tests/bear-fuzzy-wuzzy/ABC.expected2 b/ABC/tests/bear-fuzzy-wuzzy/ABC.expected2 new file mode 100644 index 0000000..2504d3b --- /dev/null +++ b/ABC/tests/bear-fuzzy-wuzzy/ABC.expected2 @@ -0,0 +1,6 @@ + + +2 matches: +bear(fuzzy) +bear(wuzzy) + diff --git a/ABC/tests/bear-fuzzy-wuzzy/ABCtest.bats b/ABC/tests/bear-fuzzy-wuzzy/ABCtest.bats index 40e00ee..631b463 100644 --- a/ABC/tests/bear-fuzzy-wuzzy/ABCtest.bats +++ b/ABC/tests/bear-fuzzy-wuzzy/ABCtest.bats @@ -14,5 +14,6 @@ teardown() { @test "ABC bear-fuzzy-wuzzy" { RESULT="$(java -cp abcdatalog.jar:Java Rep -n < ./tests/bear-fuzzy-wuzzy/ABC.input)" expected_output=$(< "./tests/bear-fuzzy-wuzzy/ABC.expected") - [[ "$RESULT" == "$expected_output" ]] + expected_output2=$(< "./tests/bear-fuzzy-wuzzy/ABC.expected2") + [[ "$RESULT" == "$expected_output" || "$RESULT" == "$expected_output2" ]] }