diff options
author | Michael Mark <michael.mark@oit.edu> | 2024-05-23 12:36:38 -0700 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-05-29 12:26:22 +0100 |
commit | 8f22ee767ecdc54061db850584deae15e348abd8 (patch) | |
tree | 4124498b102824e758c3fe0f04b0544d27bc70d1 /test | |
parent | 20e821439e23f34bb8b614136ed33aec37961cbd (diff) | |
download | gleam_stdlib-8f22ee767ecdc54061db850584deae15e348abd8.tar.gz gleam_stdlib-8f22ee767ecdc54061db850584deae15e348abd8.zip |
Added tests for \b, \v, \e, \f
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/string_test.gleam | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index 4103f67..b21b213 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -688,6 +688,15 @@ pub fn inspect_test() { string.inspect("\f") |> should.equal("\"\\f\"") + string.inspect("\u{08}") + |> should.equal("\"\\b\"") + + string.inspect("\u{0B}") + |> should.equal("\"\\v\"") + + string.inspect("\u{1B}") + |> should.equal("\"\\e\"") + string.inspect("\r\r") |> should.equal("\"\\r\\r\"") @@ -715,6 +724,30 @@ pub fn inspect_test() { string.inspect("\r\t") |> should.equal("\"\\r\\t\"") + string.inspect("\t\f") + |> should.equal("\"\\t\\f\"") + + string.inspect("\f\t") + |> should.equal("\"\\f\\t\"") + + string.inspect("\t\u{08}") + |> should.equal("\"\\t\\b\"") + + string.inspect("\u{08}\t") + |> should.equal("\"\\b\\t\"") + + string.inspect("\t\u{0B}") + |> should.equal("\"\\t\\v\"") + + string.inspect("\u{0B}\t") + |> should.equal("\"\\v\\t\"") + + string.inspect("\t\u{1B}") + |> should.equal("\"\\t\\e\"") + + string.inspect("\u{1B}\t") + |> should.equal("\"\\e\\t\"") + string.inspect("\\\n\\") |> should.equal("\"\\\\\\n\\\\\"") |