Elm Exactly
Results / elm-regex /

RegexNeverTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Regex.never` matches nothing, so `Regex.contains Regex.never` is `False` on a non-empty string.

Results

elm-0.19.1

passran in 47 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
never_contains: False

elm-0.19.2

passran in 73 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
never_contains: False

elm-0.19.3

passran in 79 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
never_contains: False

lamdera-1.5.0

passran in 79 ms
Output
never_contains: False

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-regex/RegexNeverTest] in its title.

Source

The -- CHECK: lines give the expected output.

module RegexNeverTest exposing (main)
{-| `Regex.never` matches nothing, so `Regex.contains Regex.never` is `False` on a non-empty string.
-}
-- CHECK: never_contains: False
import Html exposing (text)
import Regex
main =
let
_ = Debug.log "never_contains" (Regex.contains Regex.never "anything")
in
text "done"