diff options
author | Louis Pilfold <louis@lpil.uk> | 2020-06-30 13:31:59 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-06-30 13:31:59 +0100 |
commit | 869aff19338e474f003398aad0a251621df3517c (patch) | |
tree | eeead4d2c1c954b8bba92adb4af454e8b7a0d739 /test | |
parent | cd9f78320acf2942b5e63cd5370f14f3cce12662 (diff) | |
download | gleam_stdlib-869aff19338e474f003398aad0a251621df3517c.tar.gz gleam_stdlib-869aff19338e474f003398aad0a251621df3517c.zip |
Fix crash with unmodified bit builder
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/bit_builder_test.gleam (renamed from test/gleam/bit_string_builder_test.gleam) | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/gleam/bit_string_builder_test.gleam b/test/gleam/bit_builder_test.gleam index 43e010a..b1635e5 100644 --- a/test/gleam/bit_string_builder_test.gleam +++ b/test/gleam/bit_builder_test.gleam @@ -56,3 +56,10 @@ pub fn concat_test() { |> bit_builder.to_bit_string |> should.equal(<<1, 2, 3, 4, 5, 6>>) } + +pub fn from_string_test() { + // Regression test: no additional modification of the builder + bit_builder.from_bit_string(<<>>) + |> bit_builder.to_bit_string + |> should.equal(<<>>) +} |