From 645639203be464eb76b62c94020ac2c8ca092284 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 26 Jun 2018 00:13:48 -0400 Subject: [PATCH] add tests --- test/dcard_regex/curl | 1 + test/dcard_regex/regex.json | 24 ++++++++++++++++++++++++ test/dcard_source/curl | 1 + 3 files changed, 26 insertions(+) create mode 100644 test/dcard_regex/curl create mode 100644 test/dcard_regex/regex.json create mode 100644 test/dcard_source/curl diff --git a/test/dcard_regex/curl b/test/dcard_regex/curl new file mode 100644 index 0000000..07372e6 --- /dev/null +++ b/test/dcard_regex/curl @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X POST -d@./regex.json http://localhost/regex \ No newline at end of file diff --git a/test/dcard_regex/regex.json b/test/dcard_regex/regex.json new file mode 100644 index 0000000..4a17a95 --- /dev/null +++ b/test/dcard_regex/regex.json @@ -0,0 +1,24 @@ +[ + { + "regex": { + "function": "extract", + "description": "pull first 20 characters from description for mapping", + "where": [ + {} + ], + "defn": [ + { + "regex": ".{1,20}", + "map": "y", + "field": "f20", + "flag": "", + "key": "{Description}", + "retain": "y" + } + ] + }, + "sequence": 2, + "name": "First 20", + "srce": "dcard" + } +] \ No newline at end of file diff --git a/test/dcard_source/curl b/test/dcard_source/curl new file mode 100644 index 0000000..b92fbae --- /dev/null +++ b/test/dcard_source/curl @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X POST -d@./srce.json http://localhost/srce_set \ No newline at end of file