summaryrefslogtreecommitdiffstats
path: root/test/csv
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
commitc484829272cd13a738e35412498e12f2c9a194ac (patch)
treea1f5ec09629ee895bd3963fa8820b45f2f4c574b /test/csv
parentInitial commit. (diff)
downloadliborcus-c484829272cd13a738e35412498e12f2c9a194ac.tar.xz
liborcus-c484829272cd13a738e35412498e12f2c9a194ac.zip
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/double-quotes/check.txt6
-rw-r--r--test/csv/double-quotes/input.csv3
-rw-r--r--test/csv/normal-quotes/check.txt6
-rw-r--r--test/csv/normal-quotes/input.csv2
-rw-r--r--test/csv/quoted-with-delim/check.txt2
-rw-r--r--test/csv/quoted-with-delim/input.csv1
-rw-r--r--test/csv/simple-numbers/check.txt11
-rw-r--r--test/csv/simple-numbers/input.csv5
-rw-r--r--test/csv/split-sheet/check-1.txt42
-rw-r--r--test/csv/split-sheet/check-2.txt44
-rw-r--r--test/csv/split-sheet/check-3.txt22
-rw-r--r--test/csv/split-sheet/input.csv21
12 files changed, 165 insertions, 0 deletions
diff --git a/test/csv/double-quotes/check.txt b/test/csv/double-quotes/check.txt
new file mode 100644
index 0000000..7bf03e1
--- /dev/null
+++ b/test/csv/double-quotes/check.txt
@@ -0,0 +1,6 @@
+data/0/0:string:"\"single literal quote\""
+data/0/1:string:"\"\"double literal quote\"\""
+data/0/2:string:"\"\"\"triple literal quote\"\"\""
+data/1/0:numeric:1
+data/1/1:numeric:2
+data/1/2:numeric:3
diff --git a/test/csv/double-quotes/input.csv b/test/csv/double-quotes/input.csv
new file mode 100644
index 0000000..3c8ee50
--- /dev/null
+++ b/test/csv/double-quotes/input.csv
@@ -0,0 +1,3 @@
+"""single literal quote""","""""double literal quote""""","""""""triple literal quote"""""""
+1,2,3
+
diff --git a/test/csv/normal-quotes/check.txt b/test/csv/normal-quotes/check.txt
new file mode 100644
index 0000000..dc3f207
--- /dev/null
+++ b/test/csv/normal-quotes/check.txt
@@ -0,0 +1,6 @@
+data/0/0:string:"normal quote"
+data/0/1:string:" not quoted"
+data/0/2:string:" \"and other quoted cells\""
+data/1/0:string:"not quoted"
+data/1/1:string:" \"quoted\""
+data/1/2:string:" and so on...."
diff --git a/test/csv/normal-quotes/input.csv b/test/csv/normal-quotes/input.csv
new file mode 100644
index 0000000..f600712
--- /dev/null
+++ b/test/csv/normal-quotes/input.csv
@@ -0,0 +1,2 @@
+"normal quote", not quoted, "and other quoted cells"
+not quoted, "quoted", and so on....
diff --git a/test/csv/quoted-with-delim/check.txt b/test/csv/quoted-with-delim/check.txt
new file mode 100644
index 0000000..dd594fe
--- /dev/null
+++ b/test/csv/quoted-with-delim/check.txt
@@ -0,0 +1,2 @@
+data/0/0:string:"This is a single normal quoted cell, and contains a delimiter."
+data/0/1:string:"next cell"
diff --git a/test/csv/quoted-with-delim/input.csv b/test/csv/quoted-with-delim/input.csv
new file mode 100644
index 0000000..d7114cf
--- /dev/null
+++ b/test/csv/quoted-with-delim/input.csv
@@ -0,0 +1 @@
+"This is a single normal quoted cell, and contains a delimiter.",next cell
diff --git a/test/csv/simple-numbers/check.txt b/test/csv/simple-numbers/check.txt
new file mode 100644
index 0000000..0c5a816
--- /dev/null
+++ b/test/csv/simple-numbers/check.txt
@@ -0,0 +1,11 @@
+data/0/0:numeric:1
+data/0/1:numeric:2
+data/0/2:numeric:3
+data/0/3:numeric:4
+data/0/4:numeric:5
+data/1/0:numeric:6
+data/1/1:numeric:7
+data/1/2:numeric:8
+data/1/3:numeric:9
+data/1/4:numeric:10
+data/3/0:numeric:11
diff --git a/test/csv/simple-numbers/input.csv b/test/csv/simple-numbers/input.csv
new file mode 100644
index 0000000..e8712bc
--- /dev/null
+++ b/test/csv/simple-numbers/input.csv
@@ -0,0 +1,5 @@
+1,2,3,4,5
+6,7,8,9,10
+
+11
+
diff --git a/test/csv/split-sheet/check-1.txt b/test/csv/split-sheet/check-1.txt
new file mode 100644
index 0000000..7eae1fb
--- /dev/null
+++ b/test/csv/split-sheet/check-1.txt
@@ -0,0 +1,42 @@
+data/0/0:string:"F1"
+data/0/1:string:"F2"
+data/1/0:string:"A-1"
+data/1/1:numeric:1
+data/2/0:string:"A-2"
+data/2/1:numeric:2
+data/3/0:string:"A-3"
+data/3/1:numeric:3
+data/4/0:string:"A-4"
+data/4/1:numeric:4
+data/5/0:string:"A-5"
+data/5/1:numeric:5
+data/6/0:string:"A-6"
+data/6/1:numeric:6
+data/7/0:string:"A-7"
+data/7/1:numeric:7
+data/8/0:string:"A-8"
+data/8/1:numeric:8
+data/9/0:string:"A-9"
+data/9/1:numeric:9
+data/10/0:string:"A-10"
+data/10/1:numeric:10
+data_1/0/0:string:"A-11"
+data_1/0/1:numeric:11
+data_1/1/0:string:"A-12"
+data_1/1/1:numeric:12
+data_1/2/0:string:"A-13"
+data_1/2/1:numeric:13
+data_1/3/0:string:"A-14"
+data_1/3/1:numeric:14
+data_1/4/0:string:"A-15"
+data_1/4/1:numeric:15
+data_1/5/0:string:"A-16"
+data_1/5/1:numeric:16
+data_1/6/0:string:"A-17"
+data_1/6/1:numeric:17
+data_1/7/0:string:"A-18"
+data_1/7/1:numeric:18
+data_1/8/0:string:"A-19"
+data_1/8/1:numeric:19
+data_1/9/0:string:"A-20"
+data_1/9/1:numeric:20
diff --git a/test/csv/split-sheet/check-2.txt b/test/csv/split-sheet/check-2.txt
new file mode 100644
index 0000000..f022c8b
--- /dev/null
+++ b/test/csv/split-sheet/check-2.txt
@@ -0,0 +1,44 @@
+data/0/0:string:"F1"
+data/0/1:string:"F2"
+data/1/0:string:"A-1"
+data/1/1:numeric:1
+data/2/0:string:"A-2"
+data/2/1:numeric:2
+data/3/0:string:"A-3"
+data/3/1:numeric:3
+data/4/0:string:"A-4"
+data/4/1:numeric:4
+data/5/0:string:"A-5"
+data/5/1:numeric:5
+data/6/0:string:"A-6"
+data/6/1:numeric:6
+data/7/0:string:"A-7"
+data/7/1:numeric:7
+data/8/0:string:"A-8"
+data/8/1:numeric:8
+data/9/0:string:"A-9"
+data/9/1:numeric:9
+data/10/0:string:"A-10"
+data/10/1:numeric:10
+data_1/0/0:string:"F1"
+data_1/0/1:string:"F2"
+data_1/1/0:string:"A-11"
+data_1/1/1:numeric:11
+data_1/2/0:string:"A-12"
+data_1/2/1:numeric:12
+data_1/3/0:string:"A-13"
+data_1/3/1:numeric:13
+data_1/4/0:string:"A-14"
+data_1/4/1:numeric:14
+data_1/5/0:string:"A-15"
+data_1/5/1:numeric:15
+data_1/6/0:string:"A-16"
+data_1/6/1:numeric:16
+data_1/7/0:string:"A-17"
+data_1/7/1:numeric:17
+data_1/8/0:string:"A-18"
+data_1/8/1:numeric:18
+data_1/9/0:string:"A-19"
+data_1/9/1:numeric:19
+data_1/10/0:string:"A-20"
+data_1/10/1:numeric:20
diff --git a/test/csv/split-sheet/check-3.txt b/test/csv/split-sheet/check-3.txt
new file mode 100644
index 0000000..182a09b
--- /dev/null
+++ b/test/csv/split-sheet/check-3.txt
@@ -0,0 +1,22 @@
+data/0/0:string:"F1"
+data/0/1:string:"F2"
+data/1/0:string:"A-1"
+data/1/1:numeric:1
+data/2/0:string:"A-2"
+data/2/1:numeric:2
+data/3/0:string:"A-3"
+data/3/1:numeric:3
+data/4/0:string:"A-4"
+data/4/1:numeric:4
+data/5/0:string:"A-5"
+data/5/1:numeric:5
+data/6/0:string:"A-6"
+data/6/1:numeric:6
+data/7/0:string:"A-7"
+data/7/1:numeric:7
+data/8/0:string:"A-8"
+data/8/1:numeric:8
+data/9/0:string:"A-9"
+data/9/1:numeric:9
+data/10/0:string:"A-10"
+data/10/1:numeric:10
diff --git a/test/csv/split-sheet/input.csv b/test/csv/split-sheet/input.csv
new file mode 100644
index 0000000..fd4ce9d
--- /dev/null
+++ b/test/csv/split-sheet/input.csv
@@ -0,0 +1,21 @@
+F1,F2
+A-1,1
+A-2,2
+A-3,3
+A-4,4
+A-5,5
+A-6,6
+A-7,7
+A-8,8
+A-9,9
+A-10,10
+A-11,11
+A-12,12
+A-13,13
+A-14,14
+A-15,15
+A-16,16
+A-17,17
+A-18,18
+A-19,19
+A-20,20