You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the first of these might be considered a bug in Parsers.jl, the rest i really don't know. they may all be fine, but i think worth reviewing before we make a new release (to decide if it should be marked breaking and/or how to update InlineStrings.jl)
# test/fails.jlusing InlineStrings, Test, Parsers
using Parsers: SENTINEL, OK, EOF, OVERFLOW, QUOTED, DELIMITED, INVALID_DELIMITER, INVALID_QUOTED_FIELD, ESCAPED_STRING, NEWLINE, SUCCESS
@testsetbegin
testcases = [
# Failure due to parsing to a different value!
("\"a", InlineString7(), NamedTuple(), OK | QUOTED | INVALID_QUOTED_FIELD | EOF), # invalid quoted# Failure due to added ESCAPED_STRING code
("\"\\", InlineString7(), (; escapechar=UInt8('\\')), OK | QUOTED | INVALID_QUOTED_FIELD | EOF), # \\ e, invalid quoted# Failure due to added OK code
("NA", InlineString7(), (; sentinel=["NA"]), EOF | SENTINEL), # sentinel# Failures due to no EOF code
("\"\",", InlineString7(), NamedTuple(), OK | QUOTED | EOF | DELIMITED), # same e & cq
("\"a\",", InlineString7("a"), NamedTuple(), OK | QUOTED | EOF | DELIMITED), # quoted
("a,", InlineString7("a"), NamedTuple(), OK | EOF | DELIMITED),
("a__", InlineString7("a"), (; delim="__"), OK | EOF | DELIMITED),
("a,", InlineString7("a"), (; ignorerepeated=true), OK | EOF | DELIMITED),
("a__", InlineString7("a"), (; delim="__", ignorerepeated=true), OK | EOF | DELIMITED),
]
for (i, case) inenumerate(testcases)
println("\n---")
println("testing case = $i")
buf, check, opts, checkcode = case
res = Parsers.xparse(InlineString7, buf; opts...)
@show buf
if!(check== res.val)
@show check
@show res.val
end@test check === res.val
if!(checkcode == res.code)
@show Parsers.codes(checkcode)
@show Parsers.codes(res.code)
end@test checkcode == res.code
endend
julia>include("test/fails.jl")
---
testing case =1
buf ="\"a"
check =""
res.val ="a"
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:34
Expression: check === res.val
Evaluated:""==="a"
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:34 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =2
buf ="\"\\"
Parsers.codes(checkcode) ="INVALID: OK | QUOTED | EOF | INVALID_QUOTED_FIELD "
Parsers.codes(res.code) ="INVALID: OK | QUOTED | ESCAPED_STRING | EOF | INVALID_QUOTED_FIELD "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:-32667==-32155
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =3
buf ="NA"
Parsers.codes(checkcode) ="SUCCESS: SENTINEL | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | SENTINEL | EOF "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:34==35
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =4
buf ="\"\","
Parsers.codes(checkcode) ="SUCCESS: OK | QUOTED | DELIMITED | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | QUOTED | DELIMITED "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:45==13
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =5
buf ="\"a\","
Parsers.codes(checkcode) ="SUCCESS: OK | QUOTED | DELIMITED | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | QUOTED | DELIMITED "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:45==13
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =6
buf ="a,"
Parsers.codes(checkcode) ="SUCCESS: OK | DELIMITED | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | DELIMITED "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:41==9
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =7
buf ="a__"
Parsers.codes(checkcode) ="SUCCESS: OK | DELIMITED | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | DELIMITED "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:41==9
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =8
buf ="a,"
Parsers.codes(checkcode) ="SUCCESS: OK | DELIMITED | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | DELIMITED "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:41==9
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7---
testing case =9
buf ="a__"
Parsers.codes(checkcode) ="SUCCESS: OK | DELIMITED | EOF "
Parsers.codes(res.code) ="SUCCESS: OK | DELIMITED "
test set: Test Failed at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:40
Expression: checkcode == res.code
Evaluated:41==9
Stacktrace:
[1] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
[2] macro expansion
@ ~/repos/InlineStrings.jl/test/fails.jl:40 [inlined]
[3] macro expansion
@ /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Test/src/Test.jl:1357 [inlined]
[4] top-level scope
@ ~/repos/InlineStrings.jl/test/fails.jl:7
Test Summary:| Pass Fail Total Time
test set |99180.0s
ERROR: LoadError: Some tests did not pass:9 passed, 9 failed, 0 errored, 0 broken.
in expression starting at /Users/nickr/repos/InlineStrings.jl/test/fails.jl:6
The text was updated successfully, but these errors were encountered:
Using the unreleased version of Parsers.jl post-#127 the following test cases from InlineStrings.jl fail (these are cut down from the InlineStrings.jl tests, to see the failures in the context of the full testset see https://github.com/JuliaData/Parsers.jl/actions/runs/3300589688/jobs/5445241946).
I think the first of these might be considered a bug in Parsers.jl, the rest i really don't know. they may all be fine, but i think worth reviewing before we make a new release (to decide if it should be marked breaking and/or how to update InlineStrings.jl)
The text was updated successfully, but these errors were encountered: