[Fuego] [PATCH] Add command basename, busybox and bzcat to the testset.
Wang Mingyu
wangmy at cn.fujitsu.com
Fri Jun 8 15:14:43 UTC 2018
Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
---
.../tests/Functional.busybox/tests/busybox_basename.sh | 13 +++++++++++++
engine/tests/Functional.busybox/tests/busybox_busybox.sh | 13 +++++++++++++
engine/tests/Functional.busybox/tests/busybox_bzcat.sh | 16 ++++++++++++++++
3 files changed, 42 insertions(+)
create mode 100644 engine/tests/Functional.busybox/tests/busybox_basename.sh
create mode 100644 engine/tests/Functional.busybox/tests/busybox_busybox.sh
create mode 100644 engine/tests/Functional.busybox/tests/busybox_bzcat.sh
diff --git a/engine/tests/Functional.busybox/tests/busybox_basename.sh b/engine/tests/Functional.busybox/tests/busybox_basename.sh
new file mode 100644
index 0000000..78fc3c6
--- /dev/null
+++ b/engine/tests/Functional.busybox/tests/busybox_basename.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# The testscript checks the following options of the command basename
+# 1) Option none
+
+test="basename"
+
+if [ $(busybox basename ./test_dir/test1) = "test1" ]
+then
+ echo " -> $test: TEST-PASS"
+else
+ echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.busybox/tests/busybox_busybox.sh b/engine/tests/Functional.busybox/tests/busybox_busybox.sh
new file mode 100644
index 0000000..d29ea13
--- /dev/null
+++ b/engine/tests/Functional.busybox/tests/busybox_busybox.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# The testscript checks the following options of the command busybox
+# 1) Option none
+
+test="busybox"
+
+if busybox | grep ^BusyBox
+then
+ echo " -> $test: TEST-PASS"
+else
+ echo " -> $test: TEST-FAIL"
+fi;
diff --git a/engine/tests/Functional.busybox/tests/busybox_bzcat.sh b/engine/tests/Functional.busybox/tests/busybox_bzcat.sh
new file mode 100644
index 0000000..0531d19
--- /dev/null
+++ b/engine/tests/Functional.busybox/tests/busybox_bzcat.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# The testscript checks the following options of the command bzcat
+# 1) Option none
+
+test="bzcat"
+
+echo "This is a test file">test1
+bzip2 test1
+if [ "$(busybox bzcat test1.bz2)" = "This is a test file" ]
+then
+ echo " -> $test: TEST-PASS"
+else
+ echo " -> $test: TEST-FAIL"
+fi;
+rm -rf test1.bz2;
--
1.8.3.1
More information about the Fuego
mailing list