Fixed handling of UTF8 encoded CSVs #1373

This commit is contained in:
Mike Farah
2022-10-08 13:12:50 +11:00
parent 1b8d399de4
commit 33ec66cfdd
5 changed files with 24 additions and 1 deletions
+14
View File
@@ -63,6 +63,20 @@ EOM
assertEquals "$expected" "$X"
}
testInputCSVUTF8() {
read -r -d '' expected << EOM
- id: 1
first: john
last: smith
- id: 1
first: jane
last: smith
EOM
X=$(./yq -p=csv utf8.csv)
assertEquals "$expected" "$X"
}
testInputTSV() {
cat >test.tsv <<EOL
fruit yumLevel