Test that the shipped data loads from a Go package per module, that a bare New fails naming WithDataFS, and that a read nothing provides names the modules its reader's manifest reads
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ func TestAnOptionOfTheWrongKindIsNamedByItsJSONKind(t *testing.T) {
|
||||
t.Errorf("compile(%s) = %v, want %q", src, err, want)
|
||||
}
|
||||
}
|
||||
_, err := New(WithoutShippedData(), WithDataPath(writeFiles(t, map[string]string{"t.json": `{"format":"{a}","rows":"t.tsv","key":5}`, "t.tsv": "a\nx\n"})))
|
||||
_, err := New(WithDataPath(writeFiles(t, map[string]string{"t.json": `{"format":"{a}","rows":"t.tsv","key":5}`, "t.tsv": "a\nx\n"})))
|
||||
if err == nil || !strings.Contains(err.Error(), "key must be a string, not a number") {
|
||||
t.Errorf("key 5 = %v, want the kind named", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user