This commit is contained in:
James Cor
2022-09-07 13:13:26 -07:00
parent 61ea5650c0
commit bac5e87c4e
@@ -60,6 +60,23 @@ teardown() {
teardown_common
}
@test "import-create-tables: correctly ignores byte order mark (BOM)" {
printf '\xEF\xBB\xBF' > bom.csv
cat <<DELIM >> bom.csv
c1,c2
1,2
DELIM
run dolt table import -c bom bom.csv
[ "$status" -eq 0 ]
[[ "$output" =~ "Rows Processed: 1, Additions: 1, Modifications: 0, Had No Effect: 0" ]] || false
[[ "$output" =~ "Import completed successfully." ]] || false
run dolt sql -q "select c1 from bom"
[ "$status" -eq 0 ]
[[ "$output" =~ "1" ]] || false
}
@test "import-create-tables: create a table with json import" {
run dolt table import -c -s `batshelper employees-sch.sql` employees `batshelper employees-tbl.json`
[ "$status" -eq 0 ]