StringUnicodeTest
Tags:elm-unspecced
Three string literals logged under the labels `greek`, `emoji` and `chinese` print without error. Despite the labels, all three strings are plain ASCII (`"alpha beta gamma"` and `"hello"` twice), and only the labels are checked, not the logged values. A Standard Definition of Elm? does not decide this test: `Debug.log l v` evaluates to `v`, and any output it makes, its text, its order and whether it is made at all, is outside the definition (ruling A62).
Results
elm-0.19.1
passran in 52 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. greek: "alpha beta gamma" emoji: "hello" chinese: "hello"
elm-0.19.2
passran in 68 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. greek: "alpha beta gamma" emoji: "hello" chinese: "hello"
elm-0.19.3
passran in 49 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. greek: "alpha beta gamma" emoji: "hello" chinese: "hello"
lamdera-1.5.0
passran in 70 msOutput
greek: "alpha beta gamma" emoji: "hello" chinese: "hello"
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm/StringUnicodeTest] in its title.
Source
The -- CHECK: lines give the expected output.
module StringUnicodeTest exposing (main)
{-| Three string literals logged under the labels `greek`, `emoji` and `chinese` print
without error.
Despite the labels, all three strings are plain ASCII (`"alpha beta gamma"` and `"hello"`
twice), and only the labels are checked, not the logged values.
A Standard Definition of Elm? does not decide this test: `Debug.log l v` evaluates to `v`, and any
output it makes, its text, its order and whether it is made at all, is outside the definition
(ruling A62).
-}
-- TAGS: elm-unspecced
-- CHECK: greek
-- CHECK: emoji
-- CHECK: chinese
import Html exposing (text)
main =
let
_ = Debug.log "greek" "alpha beta gamma"
_ = Debug.log "emoji" "hello"
_ = Debug.log "chinese" "hello"
in
text "done"