Skip to content

Commit ca8ac2a

Browse files
committed
Fix test on Windows
1 parent 5b202fe commit ca8ac2a

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

enginetest/queries/load_queries.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ import (
2222
)
2323

2424
var LoadDataScripts = []ScriptTest{
25-
{
26-
Name: "LOAD DATA applies column defaults when \\N provided",
27-
SetUpScript: []string{
28-
"create table t (pk int primary key, c1 int default 1, c2 int)",
29-
"LOAD DATA INFILE './testdata/load_defaults_null.csv' INTO TABLE t FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'",
30-
},
31-
Assertions: []ScriptTestAssertion{
32-
{
33-
Query: "select * from t",
34-
Expected: []sql.Row{{1, 1, 1}},
35-
},
36-
},
37-
},
25+
{
26+
Name: "LOAD DATA applies column defaults when \\N provided",
27+
SetUpScript: []string{
28+
"create table t (pk int primary key, c1 int default 1, c2 int)",
29+
// Explicitly use Windows-style line endings to be robust on Windows CI
30+
"LOAD DATA INFILE './testdata/load_defaults_null.csv' INTO TABLE t FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'",
31+
},
32+
Assertions: []ScriptTestAssertion{
33+
{
34+
Query: "select * from t",
35+
Expected: []sql.Row{{1, 1, 1}},
36+
},
37+
},
38+
},
3839
{
3940
Name: "Basic load data with enclosed values.",
4041
SetUpScript: []string{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1,\N,1
1+
1,\N,1

0 commit comments

Comments
 (0)