Results / elm-parser /
ParserTokenTest
Checks that `Parser.token` matches a prefix even when an identifier character follows. `token "let"` succeeds on `"letter"`. Compare `ParserKeywordTest`, where `keyword "let"` fails on the same input.
Results
elm-0.19.1
passran in 46 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. letter: True
elm-0.19.2
passran in 49 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. letter: True
elm-0.19.3
passran in 65 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. letter: True
lamdera-1.5.0
passran in 53 msOutput
letter: True
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-parser/ParserTokenTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ParserTokenTest exposing (main)
{-| Checks that `Parser.token` matches a prefix even when an identifier character follows.
`token "let"` succeeds on `"letter"`. Compare `ParserKeywordTest`, where
`keyword "let"` fails on the same input.
-}
-- CHECK: letter: True
import Html exposing (text)
import Parser
main =
let
result = Parser.run (Parser.token "let") "letter"
_ = Debug.log "letter"
(case result of
Ok _ -> True
Err _ -> False
)
in
text "done"