Skip to content

Commit 8493d52

Browse files
committed
Update tests
1 parent fe784cb commit 8493d52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ if [ "$test_3_actual" != "$test_3_expected" ]; then
3333
test_failed="true"
3434
fi
3535

36-
test_4_actual=$(curl --silent --request POST --header "X-XlsForm-FormId-Fallback: validate-error" --data-binary @test/validate-error.xlsx http://127.0.0.1:5001/api/v1/convert)
37-
test_4_expected='{"error":"ODK Validate Errors:\n>> Something broke the parser.\nError evaluating field '\''concat'\'' (${concat}[1]): The problem was located in Calculate expression for ${concat}\nXPath evaluation: cannot handle function '\''concatx'\''\nCaused by: org.javarosa.xpath.XPathUnhandledException: The problem was located in Calculate expression for ${concat}\nXPath evaluation: cannot handle function '\''concatx'\''\n\t... 10 more\n\nThe following files failed validation:\n${validate-error}.xml\n\nResult: Invalid","itemsets":null,"result":null,"status":400,"warnings":null}'
36+
# test removes tmp file name from actual and expected
37+
test_4_actual=$(curl --silent --request POST --data-binary @test/validate-error.xlsx http://127.0.0.1:5001/api/v1/convert | sed 's/tmp[0-9a-z]\{8\}//g')
38+
test_4_expected=$(echo '{"error":"ODK Validate Errors:\n>> Something broke the parser.\nError evaluating field '\''concat'\'' (${concat}[1]): The problem was located in Calculate expression for ${concat}\nXPath evaluation: cannot handle function '\''concatx'\''\nCaused by: org.javarosa.xpath.XPathUnhandledException: The problem was located in Calculate expression for ${concat}\nXPath evaluation: cannot handle function '\''concatx'\''\n\t... 10 more\n\nThe following files failed validation:\n${}\n\nResult: Invalid","itemsets":null,"result":null,"status":400,"warnings":null}' | sed 's/tmp[0-9a-z]\{8\}//g')
3839
if [ "$test_4_actual" != "$test_4_expected" ]; then
3940
echo "test 4 failed: form that passes pyxform's internal checks, but fails ODK Validate's checks"
4041
echo "$test_4_actual"

0 commit comments

Comments
 (0)