aboutsummaryrefslogtreecommitdiff
path: root/tests/configuration
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2024-03-14 08:26:58 +0100
committerSébastien Dailly <sebastien@dailly.me>2024-03-14 08:26:58 +0100
commit6b377719c10d5ab3343fd5221f99a4a21008e25a (patch)
treea7c1e9a820d339a2f161af3e09cf9e3161286796 /tests/configuration
Initial commitmain
Diffstat (limited to 'tests/configuration')
-rw-r--r--tests/configuration/example_csv.toml31
-rw-r--r--tests/configuration/simple.toml20
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/configuration/example_csv.toml b/tests/configuration/example_csv.toml
new file mode 100644
index 0000000..24cee9b
--- /dev/null
+++ b/tests/configuration/example_csv.toml
@@ -0,0 +1,31 @@
+version = 1
+
+[source]
+ file = "importer.csv"
+ name = "source"
+
+[externals.target]
+ intern_key = ":source.A"
+ extern_key = ":A"
+ file = "financial.xlsx"
+ allow_missing = false
+
+[externals.a_financial]
+ intern_key = ":target.A"
+ extern_key = ":O"
+ file = "financial.xlsx"
+ allow_missing = false
+
+[sheet]
+ columns = [":A",
+ "concat(\"-\", :A, :target.E, :B)",
+ ":C",
+ "counter([:C],[:A])",
+ ":E",
+ "match(\"\\(..\\)\", :B)",
+ ":D",
+ "counter([:D],[:A])"
+ ]
+ filters = []
+ sort = []
+ uniq = []
diff --git a/tests/configuration/simple.toml b/tests/configuration/simple.toml
new file mode 100644
index 0000000..d41383a
--- /dev/null
+++ b/tests/configuration/simple.toml
@@ -0,0 +1,20 @@
+version = 1
+
+[source]
+name = "source_name"
+file = "source_file"
+tab = 1
+
+[externals.target]
+extern_key = "\"_B\""
+# Here, the values A & B are considered as column, and not litteral
+intern_key = "function(:A, :B)"
+allow_missing = true
+file = ""
+tab = 1
+
+[sheet]
+columns = [
+ "function(:target.A, :B, 'free\\' text')",
+ "counter([:target.A],[:target.A])"
+]