Skip to content

Commit 3be7857

Browse files
bcpeinhardtlpil
authored andcommitted
use wibble not foo + use raw string
1 parent 2abb285 commit 3be7857

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

compiler-core/src/erlang/tests/bit_arrays.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,15 @@ pub fn main() {
318318
#[test]
319319
fn unicode_character_encoding_in_bit_array_pattern_segment() {
320320
assert_erl!(
321-
"
321+
r#"
322322
pub fn main() -> Nil {
323-
let foo = <<\"\\u{00A9}foo\":utf8>>
324-
let _bits = case foo {
325-
<<\"\\u{00A9}\":utf8, rest: bits>> -> rest
326-
_ -> foo
323+
let wibble = <<"\u{00A9}wibble":utf8>>
324+
let _bits = case wibble {
325+
<<"\u{00A9}":utf8, rest: bits>> -> rest
326+
_ -> wibble
327327
}
328328
Nil
329329
}
330-
"
330+
"#
331331
);
332332
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
source: compiler-core/src/erlang/tests/bit_arrays.rs
3-
expression: "\npub fn main() -> Nil {\n let foo = <<\"\\u{00A9}foo\":utf8>>\n let _bits = case foo {\n <<\"\\u{00A9}\":utf8, rest: bits>> -> rest\n _ -> foo\n }\n Nil\n}\n"
3+
expression: "\npub fn main() -> Nil {\n let wibble = <<\"\\u{00A9}wibble\":utf8>>\n let _bits = case wibble {\n <<\"\\u{00A9}\":utf8, rest: bits>> -> rest\n _ -> wibble\n }\n Nil\n}\n"
44
---
55
----- SOURCE CODE
66

77
pub fn main() -> Nil {
8-
let foo = <<"\u{00A9}foo":utf8>>
9-
let _bits = case foo {
8+
let wibble = <<"\u{00A9}wibble":utf8>>
9+
let _bits = case wibble {
1010
<<"\u{00A9}":utf8, rest: bits>> -> rest
11-
_ -> foo
11+
_ -> wibble
1212
}
1313
Nil
1414
}
@@ -23,12 +23,12 @@ pub fn main() -> Nil {
2323
-file("project/test/my/mod.gleam", 2).
2424
-spec main() -> nil.
2525
main() ->
26-
Foo = <<"\x{00A9}foo"/utf8>>,
27-
_ = case Foo of
26+
Wibble = <<"\x{00A9}wibble"/utf8>>,
27+
_ = case Wibble of
2828
<<"\x{00A9}"/utf8, Rest/bitstring>> ->
2929
Rest;
3030

3131
_ ->
32-
Foo
32+
Wibble
3333
end,
3434
nil.

0 commit comments

Comments
 (0)