Skip to content

Commit 82ec805

Browse files
committed
fix: trim leading newline in snapshots test
1 parent 4613037 commit 82ec805

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1523
-1563
lines changed

Diff for: crates/parser/tests/snapshots/statements/valid/[email protected]

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
---
22
source: crates/parser/tests/statement_parser_test.rs
3-
description: "\nCREATE CAST (bigint AS int4) WITHOUT FUNCTION AS IMPLICIT;"
3+
description: CREATE CAST (bigint AS int4) WITHOUT FUNCTION AS IMPLICIT;
44
---
55
Parse {
6-
cst: SourceFile@0..59
7-
Newline@0..1 "\n"
8-
CreateCastStmt@1..59
9-
Create@1..7 "CREATE"
10-
Whitespace@7..8 " "
11-
Cast@8..12 "CAST"
12-
Whitespace@12..13 " "
13-
Ascii40@13..14 "("
14-
TypeName@14..20
15-
Bigint@14..20 "bigint"
16-
Whitespace@20..21 " "
17-
As@21..23 "AS"
18-
Whitespace@23..24 " "
19-
TypeName@24..28
20-
Ident@24..28 "int4"
21-
Ascii41@28..29 ")"
22-
Whitespace@29..30 " "
23-
Without@30..37 "WITHOUT"
24-
Whitespace@37..38 " "
25-
Function@38..46 "FUNCTION"
26-
Whitespace@46..47 " "
27-
As@47..49 "AS"
28-
Whitespace@49..50 " "
29-
ImplicitP@50..58 "IMPLICIT"
30-
Ascii59@58..59 ";"
6+
cst: SourceFile@0..58
7+
CreateCastStmt@0..58
8+
Create@0..6 "CREATE"
9+
Whitespace@6..7 " "
10+
Cast@7..11 "CAST"
11+
Whitespace@11..12 " "
12+
Ascii40@12..13 "("
13+
TypeName@13..19
14+
Bigint@13..19 "bigint"
15+
Whitespace@19..20 " "
16+
As@20..22 "AS"
17+
Whitespace@22..23 " "
18+
TypeName@23..27
19+
Ident@23..27 "int4"
20+
Ascii41@27..28 ")"
21+
Whitespace@28..29 " "
22+
Without@29..36 "WITHOUT"
23+
Whitespace@36..37 " "
24+
Function@37..45 "FUNCTION"
25+
Whitespace@45..46 " "
26+
As@46..48 "AS"
27+
Whitespace@48..49 " "
28+
ImplicitP@49..57 "IMPLICIT"
29+
Ascii59@57..58 ";"
3130
,
3231
errors: [],
3332
stmts: [
@@ -92,7 +91,7 @@ Parse {
9291
inout: false,
9392
},
9493
),
95-
range: 0..58,
94+
range: 0..57,
9695
},
9796
],
9897
}

Diff for: crates/parser/tests/snapshots/statements/valid/[email protected]

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
---
22
source: crates/parser/tests/statement_parser_test.rs
3-
description: "\nCREATE CAST (bigint AS int4) WITH INOUT AS ASSIGNMENT;"
3+
description: CREATE CAST (bigint AS int4) WITH INOUT AS ASSIGNMENT;
44
---
55
Parse {
6-
cst: SourceFile@0..55
7-
Newline@0..1 "\n"
8-
CreateCastStmt@1..55
9-
Create@1..7 "CREATE"
10-
Whitespace@7..8 " "
11-
Cast@8..12 "CAST"
12-
Whitespace@12..13 " "
13-
Ascii40@13..14 "("
14-
TypeName@14..20
15-
Bigint@14..20 "bigint"
16-
Whitespace@20..21 " "
17-
As@21..23 "AS"
18-
Whitespace@23..24 " "
19-
TypeName@24..28
20-
Ident@24..28 "int4"
21-
Ascii41@28..29 ")"
22-
Whitespace@29..30 " "
23-
With@30..34 "WITH"
24-
Whitespace@34..35 " "
25-
Inout@35..40 "INOUT"
26-
Whitespace@40..41 " "
27-
As@41..43 "AS"
28-
Whitespace@43..44 " "
29-
Assignment@44..54 "ASSIGNMENT"
30-
Ascii59@54..55 ";"
6+
cst: SourceFile@0..54
7+
CreateCastStmt@0..54
8+
Create@0..6 "CREATE"
9+
Whitespace@6..7 " "
10+
Cast@7..11 "CAST"
11+
Whitespace@11..12 " "
12+
Ascii40@12..13 "("
13+
TypeName@13..19
14+
Bigint@13..19 "bigint"
15+
Whitespace@19..20 " "
16+
As@20..22 "AS"
17+
Whitespace@22..23 " "
18+
TypeName@23..27
19+
Ident@23..27 "int4"
20+
Ascii41@27..28 ")"
21+
Whitespace@28..29 " "
22+
With@29..33 "WITH"
23+
Whitespace@33..34 " "
24+
Inout@34..39 "INOUT"
25+
Whitespace@39..40 " "
26+
As@40..42 "AS"
27+
Whitespace@42..43 " "
28+
Assignment@43..53 "ASSIGNMENT"
29+
Ascii59@53..54 ";"
3130
,
3231
errors: [],
3332
stmts: [
@@ -92,7 +91,7 @@ Parse {
9291
inout: true,
9392
},
9493
),
95-
range: 0..54,
94+
range: 0..53,
9695
},
9796
],
9897
}

Diff for: crates/parser/tests/snapshots/statements/valid/[email protected]

+41-42
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
11
---
22
source: crates/parser/tests/statement_parser_test.rs
3-
description: "\nCREATE AGGREGATE aggregate1 (int4, bool) (sfunc = sfunc1, stype = stype1);"
3+
description: "CREATE AGGREGATE aggregate1 (int4, bool) (sfunc = sfunc1, stype = stype1);"
44
---
55
Parse {
6-
cst: SourceFile@0..75
7-
Newline@0..1 "\n"
8-
DefineStmt@1..75
9-
Create@1..7 "CREATE"
10-
Whitespace@7..8 " "
11-
Aggregate@8..17 "AGGREGATE"
12-
Whitespace@17..18 " "
13-
Ident@18..28 "aggregate1"
14-
Whitespace@28..29 " "
15-
Ascii40@29..30 "("
16-
List@30..40
17-
FunctionParameter@30..34
18-
TypeName@30..34
19-
Ident@30..34 "int4"
20-
Ascii44@34..35 ","
21-
Whitespace@35..36 " "
22-
FunctionParameter@36..40
23-
TypeName@36..40
24-
Ident@36..40 "bool"
25-
Ascii41@40..41 ")"
26-
Whitespace@41..42 " "
27-
Ascii40@42..43 "("
28-
DefElem@43..57
29-
Ident@43..48 "sfunc"
30-
Whitespace@48..49 " "
31-
Ascii61@49..50 "="
32-
Whitespace@50..51 " "
33-
TypeName@51..57
34-
Ident@51..57 "sfunc1"
35-
Ascii44@57..58 ","
36-
Whitespace@58..59 " "
37-
DefElem@59..73
38-
Ident@59..64 "stype"
39-
Whitespace@64..65 " "
40-
Ascii61@65..66 "="
41-
Whitespace@66..67 " "
42-
TypeName@67..73
43-
Ident@67..73 "stype1"
44-
Ascii41@73..74 ")"
45-
Ascii59@74..75 ";"
6+
cst: SourceFile@0..74
7+
DefineStmt@0..74
8+
Create@0..6 "CREATE"
9+
Whitespace@6..7 " "
10+
Aggregate@7..16 "AGGREGATE"
11+
Whitespace@16..17 " "
12+
Ident@17..27 "aggregate1"
13+
Whitespace@27..28 " "
14+
Ascii40@28..29 "("
15+
List@29..39
16+
FunctionParameter@29..33
17+
TypeName@29..33
18+
Ident@29..33 "int4"
19+
Ascii44@33..34 ","
20+
Whitespace@34..35 " "
21+
FunctionParameter@35..39
22+
TypeName@35..39
23+
Ident@35..39 "bool"
24+
Ascii41@39..40 ")"
25+
Whitespace@40..41 " "
26+
Ascii40@41..42 "("
27+
DefElem@42..56
28+
Ident@42..47 "sfunc"
29+
Whitespace@47..48 " "
30+
Ascii61@48..49 "="
31+
Whitespace@49..50 " "
32+
TypeName@50..56
33+
Ident@50..56 "sfunc1"
34+
Ascii44@56..57 ","
35+
Whitespace@57..58 " "
36+
DefElem@58..72
37+
Ident@58..63 "stype"
38+
Whitespace@63..64 " "
39+
Ascii61@64..65 "="
40+
Whitespace@65..66 " "
41+
TypeName@66..72
42+
Ident@66..72 "stype1"
43+
Ascii41@72..73 ")"
44+
Ascii59@73..74 ";"
4645
,
4746
errors: [],
4847
stmts: [
@@ -235,7 +234,7 @@ Parse {
235234
replace: false,
236235
},
237236
),
238-
range: 0..74,
237+
range: 0..73,
239238
},
240239
],
241240
}

Diff for: crates/parser/tests/snapshots/statements/valid/[email protected]

+33-34
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
11
---
22
source: crates/parser/tests/statement_parser_test.rs
3-
description: "\nCREATE AGGREGATE aggregate1 (*) (sfunc = sfunc1, stype = stype1);"
3+
description: "CREATE AGGREGATE aggregate1 (*) (sfunc = sfunc1, stype = stype1);"
44
---
55
Parse {
6-
cst: SourceFile@0..66
7-
Newline@0..1 "\n"
8-
DefineStmt@1..66
9-
Create@1..7 "CREATE"
10-
Whitespace@7..8 " "
11-
Aggregate@8..17 "AGGREGATE"
12-
Whitespace@17..18 " "
13-
Ident@18..28 "aggregate1"
14-
Whitespace@28..29 " "
15-
Ascii40@29..30 "("
16-
Ascii42@30..31 "*"
17-
Ascii41@31..32 ")"
18-
Whitespace@32..33 " "
19-
Ascii40@33..34 "("
20-
DefElem@34..48
21-
Ident@34..39 "sfunc"
22-
Whitespace@39..40 " "
23-
Ascii61@40..41 "="
24-
Whitespace@41..42 " "
25-
TypeName@42..48
26-
Ident@42..48 "sfunc1"
27-
Ascii44@48..49 ","
28-
Whitespace@49..50 " "
29-
DefElem@50..64
30-
Ident@50..55 "stype"
31-
Whitespace@55..56 " "
32-
Ascii61@56..57 "="
33-
Whitespace@57..58 " "
34-
TypeName@58..64
35-
Ident@58..64 "stype1"
36-
Ascii41@64..65 ")"
37-
Ascii59@65..66 ";"
6+
cst: SourceFile@0..65
7+
DefineStmt@0..65
8+
Create@0..6 "CREATE"
9+
Whitespace@6..7 " "
10+
Aggregate@7..16 "AGGREGATE"
11+
Whitespace@16..17 " "
12+
Ident@17..27 "aggregate1"
13+
Whitespace@27..28 " "
14+
Ascii40@28..29 "("
15+
Ascii42@29..30 "*"
16+
Ascii41@30..31 ")"
17+
Whitespace@31..32 " "
18+
Ascii40@32..33 "("
19+
DefElem@33..47
20+
Ident@33..38 "sfunc"
21+
Whitespace@38..39 " "
22+
Ascii61@39..40 "="
23+
Whitespace@40..41 " "
24+
TypeName@41..47
25+
Ident@41..47 "sfunc1"
26+
Ascii44@47..48 ","
27+
Whitespace@48..49 " "
28+
DefElem@49..63
29+
Ident@49..54 "stype"
30+
Whitespace@54..55 " "
31+
Ascii61@55..56 "="
32+
Whitespace@56..57 " "
33+
TypeName@57..63
34+
Ident@57..63 "stype1"
35+
Ascii41@63..64 ")"
36+
Ascii59@64..65 ";"
3837
,
3938
errors: [],
4039
stmts: [
@@ -154,7 +153,7 @@ Parse {
154153
replace: false,
155154
},
156155
),
157-
range: 0..65,
156+
range: 0..64,
158157
},
159158
],
160159
}

0 commit comments

Comments
 (0)