From 125bd1cb82ce1d7d38de1356a93fd6da76f3767c Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Wed, 20 May 2015 08:17:58 +0200 Subject: [PATCH] separate form config files for test cases --- test/test_formconfig_basic.json | 12 ++++++++++++ test/test_formconfig_callback.json | 20 ++++++++++++++++++++ test/test_formconfig_callback.sh | 6 ++++++ test/test_formconfig_hidden.json | 13 +++++++++++++ test/test_formconfig_missingscript.json | 12 ++++++++++++ test/test_formconfig_noexec.json | 12 ++++++++++++ test/test_scriptform_list.json | 19 +++++++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 test/test_formconfig_basic.json create mode 100644 test/test_formconfig_callback.json create mode 100755 test/test_formconfig_callback.sh create mode 100644 test/test_formconfig_hidden.json create mode 100644 test/test_formconfig_missingscript.json create mode 100644 test/test_formconfig_noexec.json create mode 100644 test/test_scriptform_list.json diff --git a/test/test_formconfig_basic.json b/test/test_formconfig_basic.json new file mode 100644 index 0000000..8c36886 --- /dev/null +++ b/test/test_formconfig_basic.json @@ -0,0 +1,12 @@ +{ + "title": "test", + "forms": [ + { + "name": "test", + "title": "title", + "description": "description", + "script": "test.sh", + "fields": [] + } + ] +} diff --git a/test/test_formconfig_callback.json b/test/test_formconfig_callback.json new file mode 100644 index 0000000..ded3f95 --- /dev/null +++ b/test/test_formconfig_callback.json @@ -0,0 +1,20 @@ +{ + "title": "test", + "forms": [ + { + "name": "test_store", + "title": "title", + "description": "description", + "script": "test_formconfig_callback.sh", + "fields": [] + }, + { + "name": "test_raw", + "title": "title", + "description": "description", + "script": "test_formconfig_callback.sh", + "output": "raw", + "fields": [] + } + ] +} diff --git a/test/test_formconfig_callback.sh b/test/test_formconfig_callback.sh new file mode 100755 index 0000000..3480d26 --- /dev/null +++ b/test/test_formconfig_callback.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "stdout" +echo "stderr" >&2 + +exit 33 diff --git a/test/test_formconfig_hidden.json b/test/test_formconfig_hidden.json new file mode 100644 index 0000000..118cd48 --- /dev/null +++ b/test/test_formconfig_hidden.json @@ -0,0 +1,13 @@ +{ + "title": "test", + "forms": [ + { + "name": "test", + "title": "title", + "description": "description", + "script": "test.sh", + "hidden": true, + "fields": [] + } + ] +} diff --git a/test/test_formconfig_missingscript.json b/test/test_formconfig_missingscript.json new file mode 100644 index 0000000..b52eb36 --- /dev/null +++ b/test/test_formconfig_missingscript.json @@ -0,0 +1,12 @@ +{ + "title": "test", + "forms": [ + { + "name": "test", + "title": "title", + "description": "description", + "script": "nonexisting.sh", + "fields": [] + } + ] +} diff --git a/test/test_formconfig_noexec.json b/test/test_formconfig_noexec.json new file mode 100644 index 0000000..b01873d --- /dev/null +++ b/test/test_formconfig_noexec.json @@ -0,0 +1,12 @@ +{ + "title": "test", + "forms": [ + { + "name": "test", + "title": "title", + "description": "description", + "script": "test_noexec.sh", + "fields": [] + } + ] +} diff --git a/test/test_scriptform_list.json b/test/test_scriptform_list.json new file mode 100644 index 0000000..a0f2e9c --- /dev/null +++ b/test/test_scriptform_list.json @@ -0,0 +1,19 @@ +{ + "title": "test", + "forms": [ + { + "name": "test_list_1", + "title": "title_list_1", + "description": "description", + "script": "test.sh", + "fields": [] + }, + { + "name": "test_list_2", + "title": "test_list_2", + "description": "description", + "script": "test.sh", + "fields": [] + } + ] +}