Skip to content

Commit

Permalink
test numeric column names (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Aug 23, 2020
1 parent e467c7b commit 113bfa2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/tsv-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ tape("tsvParse(string, row) invokes row(d, i) for each row d, in order", functio
test.end();
});

tape("tsvParse(string) accepts numbers as names", function(test) {
test.deepEqual(dsv.tsvParse("11\t22\t33\n\"a\"\tb\t0"), table([{11: "a", 22: "b", 33: "0"}], ["11", "22", "33"]));
test.end();
});

tape("tsvParseRows(string) returns the expected array of array of string", function(test) {
test.deepEqual(dsv.tsvParseRows("a\tb\tc\n"), [["a", "b", "c"]]);
test.end();
Expand Down

0 comments on commit 113bfa2

Please sign in to comment.