CoreIssue1001CharToUpperSharpSTest
Tags:elm19-bug
Issue: elm/core#1001
`Char.toUpper 'ß'` returns a single character. <https://github.com/elm/core/issues/1001> Elm 0.19.1 returns a `Char` holding "SS", so `String.fromChar` of it has length 2. A `Char` is one character, so the length must be 1, whichever character it is.
Results
elm-0.19.1
failran in 87 msMissing pattern: length: 1 --- output --- Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. length: 2
elm-0.19.2
failran in 58 msMissing pattern: length: 1 --- output --- Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. length: 2
elm-0.19.3
failran in 69 msMissing pattern: length: 1 --- output --- Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. length: 2
lamdera-1.5.0
failran in 76 msMissing pattern: length: 1 --- output --- length: 2
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/CoreIssue1001CharToUpperSharpSTest] in its title.
Source
The -- CHECK: lines give the expected output.
module CoreIssue1001CharToUpperSharpSTest exposing (main)
{-| `Char.toUpper 'ß'` returns a single character.
<https://github.com/elm/core/issues/1001>
Elm 0.19.1 returns a `Char` holding "SS", so `String.fromChar` of it has length 2. A `Char` is one
character, so the length must be 1, whichever character it is.
-}
-- TAGS: elm19-bug
-- CHECK: length: 1
import Html exposing (text)
main =
let
_ =
Debug.log "length" (String.length (String.fromChar (Char.toUpper 'ß')))
in
text "done"