diff options
author | inoas <mail@inoas.com> | 2022-08-11 10:26:05 +0200 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-08-11 09:56:08 +0100 |
commit | 293340bcd1559ca5a35d713429afeda94651116b (patch) | |
tree | f63a21cf0351e4db4e682334dac3a389c3f410b8 | |
parent | 85ba2f345d4fcd964dd0c3aa7565cd03c16d7169 (diff) | |
download | gleam_stdlib-293340bcd1559ca5a35d713429afeda94651116b.tar.gz gleam_stdlib-293340bcd1559ca5a35d713429afeda94651116b.zip |
inspect output syntax
-rw-r--r-- | src/gleam_stdlib.erl | 2 | ||||
-rw-r--r-- | test/gleam/string_test.gleam | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl index e71c1e5..dc3727c 100644 --- a/src/gleam_stdlib.erl +++ b/src/gleam_stdlib.erl @@ -351,7 +351,7 @@ inspect(Binary) when is_binary(Binary) -> inspect(List) when is_list(List) -> case inspect_list(List) of {proper, Elements} -> ["[", Elements, "]"]; - {improper, Elements} -> ["//erl[", Elements, "]"] + {improper, Elements} -> ["//erl([", Elements, "])"] end; inspect(Any) when is_tuple(Any) % Record constructors andalso is_atom(element(1, Any)) diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index 83698bf..02843b3 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -794,7 +794,7 @@ if erlang { pub fn improper_list_inspect_test() { let list = improper_list_append(1, 2, 3) - assert "//erl[1, 2 | 3]" = string.inspect(list) + assert "//erl([1, 2 | 3])" = string.inspect(list) } // Warning: The type of this function is incorrect |