File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ external fn os_unsetenv(key: CharList) -> Bool =
17
17
"os" "unsetenv"
18
18
19
19
external fn char_list_to_string ( CharList ) -> String =
20
- "erlang " "list_to_binary "
20
+ "unicode " "characters_to_binary "
21
21
22
22
external fn string_to_char_list ( String ) -> CharList =
23
- "erlang " "binary_to_list "
23
+ "unicode " "characters_to_list "
24
24
25
25
/// Returns all environment variables set on the system.
26
26
pub fn get_env ( ) -> Map ( String , String ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ pub fn env_test() {
15
15
|> should . equal ( Error ( Nil ) )
16
16
}
17
17
18
+ pub fn unicode_test ( ) {
19
+ os . insert_env ( "GLEAM_UNICODE_TEST" , "Iñtërnâtiônà£ißætiøn☃💩" )
20
+ os . get_env ( )
21
+ |> map . get ( "GLEAM_UNICODE_TEST" )
22
+ |> should . equal ( Ok ( "Iñtërnâtiônà£ißætiøn☃💩" ) )
23
+ }
24
+
18
25
pub fn system_time_test ( ) {
19
26
let june_12_2020 = 1591966971
20
27
{ os . system_time ( os . Second ) > june_12_2020 }
You can’t perform that action at this time.
0 commit comments