Skip to content

Commit 5f1de96

Browse files
snthCopilot
andcommitted
chore: update insta snapshot format
Force-update all integration test snapshots to current insta format. The newer insta (1.46.3) enforces a stricter snapshot format, causing CI to fail with 'existing value is in a legacy format'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8ec7935 commit 5f1de96

28 files changed

Lines changed: 349 additions & 282 deletions

prqlc/prqlc/tests/integration/bad_error_messages.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn test_bad_error_messages() {
2424
assert_snapshot!(compile(r###"
2525
from film
2626
group
27-
"###).unwrap_err(), @r"
27+
"###).unwrap_err(), @"
2828
Error:
2929
╭─[ :3:5 ]
3030
@@ -44,7 +44,7 @@ fn test_bad_error_messages() {
4444
4545
from employees
4646
filter f location
47-
"#).unwrap_err(), @r"
47+
"#).unwrap_err(), @"
4848
Error:
4949
╭─[ :5:14 ]
5050
@@ -58,7 +58,7 @@ fn test_bad_error_messages() {
5858
assert_snapshot!(compile(r###"
5959
select tracks
6060
from artists
61-
"###).unwrap_err(), @r"
61+
"###).unwrap_err(), @"
6262
Error:
6363
╭─[ :3:5 ]
6464
@@ -136,7 +136,7 @@ fn misplaced_type_error() {
136136
let foo = 123
137137
from t
138138
select (true && foo)
139-
"###).unwrap_err(), @r"
139+
"###).unwrap_err(), @"
140140
Error:
141141
╭─[ :2:15 ]
142142
@@ -152,7 +152,7 @@ fn test_hint_missing_args() {
152152
assert_snapshot!(compile(r###"
153153
from film
154154
select {film_id, lag film_id}
155-
"###).unwrap_err(), @r"
155+
"###).unwrap_err(), @"
156156
Error:
157157
╭─[ :3:22 ]
158158
@@ -169,7 +169,7 @@ fn test_hint_missing_args() {
169169
fn test_relation_literal_contains_literals() {
170170
assert_snapshot!(compile(r###"
171171
[{a=(1+1)}]
172-
"###).unwrap_err(), @r"
172+
"###).unwrap_err(), @"
173173
Error:
174174
╭─[ :2:9 ]
175175
@@ -196,7 +196,7 @@ fn nested_groups() {
196196
}
197197
)
198198
)
199-
"###).unwrap_err(), @r"
199+
"###).unwrap_err(), @"
200200
Error:
201201
╭─[ :9:9 ]
202202
@@ -213,7 +213,7 @@ fn nested_groups() {
213213
fn just_std() {
214214
assert_snapshot!(compile(r###"
215215
std
216-
"###).unwrap_err(), @r"
216+
"###).unwrap_err(), @"
217217
Error:
218218
╭─[ :1:1 ]
219219

prqlc/prqlc/tests/integration/error_messages.rs

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn test_errors() {
1414
from x
1515
derive y = (addadd 4 5 6)
1616
"###).unwrap_err(),
17-
@r"
17+
@"
1818
Error:
1919
╭─[ :5:17 ]
2020
@@ -27,7 +27,7 @@ fn test_errors() {
2727
assert_snapshot!(compile(r###"
2828
from a select b
2929
"###).unwrap_err(),
30-
@r"
30+
@"
3131
Error:
3232
╭─[ :2:5 ]
3333
@@ -42,7 +42,7 @@ fn test_errors() {
4242
select a
4343
select b
4444
"###).unwrap_err(),
45-
@r"
45+
@"
4646
Error:
4747
╭─[ :4:12 ]
4848
@@ -58,7 +58,7 @@ fn test_errors() {
5858
from employees
5959
take 1.8
6060
"###).unwrap_err(),
61-
@r"
61+
@"
6262
Error:
6363
╭─[ :3:10 ]
6464
@@ -88,7 +88,7 @@ fn test_errors() {
8888
"#);
8989

9090
// PARSER output (full compilation error):
91-
assert_snapshot!(compile(mississippi).unwrap_err(), @r"
91+
assert_snapshot!(compile(mississippi).unwrap_err(), @"
9292
Error:
9393
╭─[ :1:23 ]
9494
@@ -98,7 +98,7 @@ fn test_errors() {
9898
───╯
9999
");
100100

101-
assert_snapshot!(compile("Answer: T-H-A-T!").unwrap_err(), @r"
101+
assert_snapshot!(compile("Answer: T-H-A-T!").unwrap_err(), @"
102102
Error:
103103
╭─[ :1:16 ]
104104
@@ -117,7 +117,7 @@ fn test_union_all_sqlite() {
117117
118118
from film
119119
remove film2
120-
"###).unwrap_err(), @r"
120+
"###).unwrap_err(), @"
121121
Error: The dialect SQLiteDialect does not support EXCEPT ALL
122122
↳ Hint: providing more column information will allow the query to be translated to an anti-join.
123123
")
@@ -129,7 +129,7 @@ fn test_regex_dialect() {
129129
prql target:sql.mssql
130130
from foo
131131
filter bar ~= 'love'
132-
"###).unwrap_err(), @r"
132+
"###).unwrap_err(), @"
133133
Error:
134134
╭─[ :4:12 ]
135135
@@ -147,7 +147,7 @@ fn test_bad_function_type() {
147147
group foo (take)
148148
"###,
149149
)
150-
.unwrap_err(), @r"
150+
.unwrap_err(), @"
151151
Error:
152152
╭─[ :3:16 ]
153153
@@ -187,7 +187,7 @@ fn test_ambiguous() {
187187
derive date = x
188188
select date
189189
"#)
190-
.unwrap_err(), @r"
190+
.unwrap_err(), @"
191191
Error:
192192
╭─[ :4:12 ]
193193
@@ -210,7 +210,7 @@ fn test_ambiguous_join() {
210210
join (from b | select {x}) true
211211
select x
212212
"#)
213-
.unwrap_err(), @r"
213+
.unwrap_err(), @"
214214
Error:
215215
╭─[ :5:12 ]
216216
@@ -232,7 +232,7 @@ fn test_ambiguous_inference() {
232232
join b(==b_id)
233233
select x
234234
"#)
235-
.unwrap_err(), @r"
235+
.unwrap_err(), @"
236236
Error:
237237
╭─[ :4:12 ]
238238
@@ -268,7 +268,7 @@ fn date_to_text_with_column_format() {
268268
from dates_to_display
269269
select {my_date, my_format}
270270
select {std.date.to_text my_date my_format}
271-
"#).unwrap_err(), @r"
271+
"#).unwrap_err(), @"
272272
Error:
273273
╭─[ :4:11 ]
274274
@@ -285,7 +285,7 @@ fn date_trunc_with_column_unit() {
285285
from dates_to_display
286286
select {my_date, my_unit}
287287
select {std.date.trunc my_unit my_date}
288-
"#).unwrap_err(), @r"
288+
"#).unwrap_err(), @"
289289
Error:
290290
╭─[ :4:11 ]
291291
@@ -321,7 +321,7 @@ fn available_columns() {
321321
from invoices
322322
select foo
323323
select bar
324-
"#).unwrap_err(), @r"
324+
"#).unwrap_err(), @"
325325
Error:
326326
╭─[ :4:12 ]
327327
@@ -350,20 +350,16 @@ fn empty_interpolations() {
350350
#[test]
351351
fn no_query_entered() {
352352
// Empty query
353-
assert_snapshot!(compile("").unwrap_err(), @r"
354-
[E0001] Error: No PRQL query entered
355-
");
353+
assert_snapshot!(compile("").unwrap_err(), @"[E0001] Error: No PRQL query entered");
356354

357355
// Comment-only query
358-
assert_snapshot!(compile("# just a comment").unwrap_err(), @r"
359-
[E0001] Error: No PRQL query entered
360-
");
356+
assert_snapshot!(compile("# just a comment").unwrap_err(), @"[E0001] Error: No PRQL query entered");
361357
}
362358

363359
#[test]
364360
fn query_must_begin_with_from() {
365361
// Query with declaration but no 'from'
366-
assert_snapshot!(compile("let x = 5").unwrap_err(), @r"
362+
assert_snapshot!(compile("let x = 5").unwrap_err(), @"
367363
[E0001] Error: PRQL queries must begin with 'from'
368364
↳ Hint: A query must start with a 'from' statement to define the main pipeline
369365
");
@@ -372,7 +368,7 @@ fn query_must_begin_with_from() {
372368
assert_snapshot!(compile(r#"
373369
let x = 5
374370
let y = 10
375-
"#).unwrap_err(), @r"
371+
"#).unwrap_err(), @"
376372
[E0001] Error: PRQL queries must begin with 'from'
377373
↳ Hint: A query must start with a 'from' statement to define the main pipeline
378374
");
@@ -384,15 +380,15 @@ fn negative_number_in_transform() {
384380
assert_snapshot!(compile(r###"
385381
from artists
386382
sort -name
387-
"###).unwrap_err(), @r"
383+
"###).unwrap_err(), @"
388384
Error: expected a pipeline that resolves to a table, but found `internal std.sub`
389385
↳ Hint: wrap negative numbers in parentheses, e.g. `sort (-column_name)`
390386
");
391387

392388
assert_snapshot!(compile(r###"
393389
from pets
394390
take -10
395-
"###).unwrap_err(), @r"
391+
"###).unwrap_err(), @"
396392
Error: expected a pipeline that resolves to a table, but found `internal std.sub`
397393
↳ Hint: wrap negative numbers in parentheses, e.g. `sort (-column_name)`
398394
");
@@ -402,7 +398,7 @@ fn negative_number_in_transform() {
402398
group id (
403399
sort -val
404400
)
405-
"###).unwrap_err(), @r"
401+
"###).unwrap_err(), @"
406402
Error: expected a pipeline that resolves to a table, but found `internal std.sub`
407403
↳ Hint: wrap negative numbers in parentheses, e.g. `sort (-column_name)`
408404
");
@@ -412,7 +408,7 @@ fn negative_number_in_transform() {
412408
fn empty_tuple_or_array_from() {
413409
assert_snapshot!(compile(r###"
414410
from {}
415-
"###).unwrap_err(), @r"
411+
"###).unwrap_err(), @"
416412
Error:
417413
╭─[ :2:10 ]
418414
@@ -424,7 +420,7 @@ fn empty_tuple_or_array_from() {
424420

425421
assert_snapshot!(compile(r###"
426422
from []
427-
"###).unwrap_err(), @r"
423+
"###).unwrap_err(), @"
428424
Error:
429425
╭─[ :2:10 ]
430426
@@ -437,7 +433,7 @@ fn empty_tuple_or_array_from() {
437433
assert_snapshot!(compile(r###"
438434
from {}
439435
select a
440-
"###).unwrap_err(), @r"
436+
"###).unwrap_err(), @"
441437
Error:
442438
╭─[ :2:10 ]
443439
@@ -454,7 +450,7 @@ fn window_rows_expects_range() {
454450
assert_snapshot!(compile(r###"
455451
from t
456452
group sid (window rows:2 (sid))
457-
"###).unwrap_err(), @r"
453+
"###).unwrap_err(), @"
458454
Error:
459455
╭─[ :3:28 ]
460456
@@ -467,7 +463,7 @@ fn window_rows_expects_range() {
467463
assert_snapshot!(compile(r###"
468464
from t
469465
group sid (window range:2 (sid))
470-
"###).unwrap_err(), @r"
466+
"###).unwrap_err(), @"
471467
Error:
472468
╭─[ :3:29 ]
473469
@@ -484,7 +480,7 @@ fn bare_lambda_expression() {
484480
// a clear error, not a confusing internal message.
485481
assert_snapshot!(compile(r###"
486482
x -> y
487-
"###).unwrap_err(), @r"
483+
"###).unwrap_err(), @"
488484
Error:
489485
╭─[ :2:5 ]
490486

prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__append_select.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
source: prqlc/prqlc/tests/integration/queries.rs
33
expression: "from invoices\nselect { customer_id, invoice_id, billing_country }\ntake 10..15\nappend (\n from invoices\n select { customer_id, invoice_id, billing_country }\n take 40..45\n)\nselect { billing_country, invoice_id }\n"
44
input_file: prqlc/prqlc/tests/integration/queries/append_select.prql
5-
snapshot_kind: text
65
---
76
SELECT
87
*

prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__append_select_compute.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
source: prqlc/prqlc/tests/integration/queries.rs
33
expression: "from invoices\nderive total = case [total < 10 => total * 2, true => total]\nselect { customer_id, invoice_id, total }\ntake 5\nappend (\n from invoice_items\n derive unit_price = case [unit_price < 1 => unit_price * 2, true => unit_price]\n select { invoice_line_id, invoice_id, unit_price }\n take 5\n)\nselect { a = customer_id * 2, b = math.round 1 (invoice_id * total) }\n"
44
input_file: prqlc/prqlc/tests/integration/queries/append_select_compute.prql
5-
snapshot_kind: text
65
---
76
WITH table_1 AS (
87
SELECT

prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__append_select_multiple_with_null.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
source: prqlc/prqlc/tests/integration/queries.rs
33
expression: "from invoices\nselect { customer_id, invoice_id, billing_country }\ntake 5\nappend (\n from employees\n select { employee_id, employee_id, country }\n take 5\n)\nappend (\n from invoice_items\n select { invoice_line_id, invoice_id, null }\n take 5\n)\nselect { billing_country, invoice_id }\n"
44
input_file: prqlc/prqlc/tests/integration/queries/append_select_multiple_with_null.prql
5-
snapshot_kind: text
65
---
76
SELECT
87
*

prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__append_select_nulls.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
source: prqlc/prqlc/tests/integration/queries.rs
3-
expression: "# duckdb:skip\n# postgres:skip\n\nfrom invoices\nselect {an_id = invoice_id, name = null}\ntake 2\nappend (\n from employees\n select {an_id = null, name = first_name}\n take 2\n)\n"
3+
expression: "from invoices\nselect {an_id = invoice_id, name = null}\ntake 2\nappend (\n from employees\n select {an_id = null, name = first_name}\n take 2\n)\n"
44
input_file: prqlc/prqlc/tests/integration/queries/append_select_nulls.prql
55
---
66
SELECT

prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__aggregation.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ source: prqlc/prqlc/tests/integration/queries.rs
33
expression: "# mysql:skip\n# clickhouse:skip\n# glaredb:skip (the string_agg function is not supported)\nfrom tracks\nfilter genre_id == 100\nderive empty_name = name == ''\naggregate {sum track_id, concat_array name, all empty_name, any empty_name}\n"
44
input_file: prqlc/prqlc/tests/integration/queries/aggregation.prql
55
---
6+
7+
8+
9+
10+
611
--- generic
712
+++ sqlite
813
@@ -1,9 +1,9 @@

prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__append_select.snap

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
source: prqlc/prqlc/tests/integration/queries.rs
33
expression: "from invoices\nselect { customer_id, invoice_id, billing_country }\ntake 10..15\nappend (\n from invoices\n select { customer_id, invoice_id, billing_country }\n take 40..45\n)\nselect { billing_country, invoice_id }\n"
44
input_file: prqlc/prqlc/tests/integration/queries/append_select.prql
5-
snapshot_kind: text
65
---
6+
7+
8+
9+
10+
11+
712
--- generic
813
+++ postgres
914
@@ -1,26 +1,19 @@

prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__append_select_compute.snap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
source: prqlc/prqlc/tests/integration/queries.rs
33
expression: "from invoices\nderive total = case [total < 10 => total * 2, true => total]\nselect { customer_id, invoice_id, total }\ntake 5\nappend (\n from invoice_items\n derive unit_price = case [unit_price < 1 => unit_price * 2, true => unit_price]\n select { invoice_line_id, invoice_id, unit_price }\n take 5\n)\nselect { a = customer_id * 2, b = math.round 1 (invoice_id * total) }\n"
44
input_file: prqlc/prqlc/tests/integration/queries/append_select_compute.prql
5-
snapshot_kind: text
65
---
6+
7+
8+
9+
710
--- generic
811
+++ glaredb
912
@@ -29,13 +29,13 @@

0 commit comments

Comments
 (0)