Files
dolt/bats
Vinai Rachakonda b171ddb55e Address escaping in longtext/json for json and csv export (#1157)
This pr addresses the linked of issue of fault exporting of json like data with prettyPrint. The solution on the csv end was opening the csv writer to the pretty print pipeline.
2021-01-04 18:18:40 -05:00
..
2020-11-24 15:39:54 -08:00
2020-11-24 15:39:54 -08:00
2020-11-24 15:39:54 -08:00
2020-08-10 10:03:37 -07:00
2020-11-29 19:27:59 -05:00
2020-11-24 15:39:54 -08:00
2020-11-23 12:47:49 -08:00
2020-11-24 15:39:54 -08:00
2020-10-12 10:43:00 -07:00
2020-11-05 14:04:48 -08:00
2020-11-12 13:36:07 -08:00
2020-06-29 08:31:18 -07:00
2020-09-01 13:57:46 -07:00
2020-08-21 12:22:09 -07:00
2020-11-16 13:08:46 -08:00

BATS - Bash Automated Testing System

We are going to use bats to test the dolt command line.

First you need to install bats.

npm install -g bats

Then, go to the directory with the bats tests and run:

bats . 

This will run all the tests. Specify a particular .bats file to run only those tests.

Here Docs

BATS tests in Dolt make extensive use of Here Docs. Common patterns include piping SQL scripts to dolt sql:

    dolt sql <<SQL
CREATE TABLE my_table (pk int PRIMARY KEY);
SQL

And creating data files for import:

    cat <<DELIM > data.csv
pk,c1,c2
1,1,1
2,2,2
DELIM
    dolt table import -c -pk=pk my_table data.csv

Skipped BATS

Various tests are skipped as TODOs and/or as documentation of known bugs. Eg:

@test "..." {
    ...
    skip "this test is currently failing because..."
}

Skipped BATS can still be partially useful for testing as they execute normally up to skip statement.