aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2023-10-31 17:30:02 +0000
committerLouis Pilfold <louis@lpil.uk>2023-10-31 17:30:02 +0000
commit8233587e5e9ef1486b029a872e80cb5456d665da (patch)
treec37406c9d23b2b22c28cb7523f10588d37ccbc95 /test
parentaa07fd92febf55c9f687d7ffe1ccde92ca0bbb09 (diff)
downloadgleam_stdlib-8233587e5e9ef1486b029a872e80cb5456d665da.tar.gz
gleam_stdlib-8233587e5e9ef1486b029a872e80cb5456d665da.zip
Correctly print non-byte aligned bit arrays
Diffstat (limited to 'test')
-rw-r--r--test/gleam/string_test.gleam7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam
index c6b9540..e1e2fcd 100644
--- a/test/gleam/string_test.gleam
+++ b/test/gleam/string_test.gleam
@@ -1066,6 +1066,13 @@ pub fn inspect_erlang_atom_with_leading_digit_invalid_in_gleam_test() {
|> should.equal("atom.create_from_string(\"1Ok\")")
}
+@target(erlang)
+pub fn fifteen_bit_int_test() {
+ <<2, 3:size(7)>>
+ |> string.inspect
+ |> should.equal("<<2, 3:size(7)>>")
+}
+
pub fn byte_size_test() {
let assert 0 = string.byte_size("")
let assert 1 = string.byte_size("a")