diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-27 11:54:30 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-27 11:54:30 +0100 |
| commit | a8fd64f9289b92614b9e6c16e909ec0c45429027 (patch) | |
| tree | 76ce8797a6fe9c8b8c0bb1783910ba4b9e22da8b /src/model/func.rs | |
| parent | 33585d9a3fbab8a76d3fd8e9c2560f929202a518 (diff) | |
Hashtags everywhere!
Diffstat (limited to 'src/model/func.rs')
| -rw-r--r-- | src/model/func.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/func.rs b/src/model/func.rs index 73b7f1c7..00e59bbd 100644 --- a/src/model/func.rs +++ b/src/model/func.rs @@ -505,17 +505,17 @@ mod tests { fn test_captures() { // Let binding and function definition. test("#let x = x", &["x"]); - test("#let x; {x + y}", &["y"]); + test("#let x; #{x + y}", &["y"]); test("#let f(x, y) = x + y", &[]); test("#let f(x, y) = f", &[]); test("#let f = (x, y) => f", &["f"]); // Closure with different kinds of params. - test("{(x, y) => x + z}", &["z"]); - test("{(x: y, z) => x + z}", &["y"]); - test("{(..x) => x + y}", &["y"]); - test("{(x, y: x + z) => x + y}", &["x", "z"]); - test("{x => x; x}", &["x"]); + test("#{(x, y) => x + z}", &["z"]); + test("#{(x: y, z) => x + z}", &["y"]); + test("#{(..x) => x + y}", &["y"]); + test("#{(x, y: x + z) => x + y}", &["x", "z"]); + test("#{x => x; x}", &["x"]); // Show rule. test("#show y: x => x", &["y"]); @@ -532,7 +532,7 @@ mod tests { test("#import x + y: x, y, z", &["x", "y"]); // Blocks. - test("{ let x = 1; { let y = 2; y }; x + y }", &["y"]); - test("[#let x = 1]#x", &["x"]); + test("#{ let x = 1; { let y = 2; y }; x + y }", &["y"]); + test("#[#let x = 1]#x", &["x"]); } } |
