[Fuego] [PATCH 22/33] Add test cases of command perl.

Wang Mingyu wangmy at cn.fujitsu.com
Wed May 8 08:00:30 UTC 2019


This test set is used to report the message of echo and file by perl.

Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
---
 tests/Functional.misc/tests/perl.sh           | 12 ++++++++++++
 tests/Functional.misc/tests/perl_tst-float.sh | 17 +++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 tests/Functional.misc/tests/perl.sh
 create mode 100644 tests/Functional.misc/tests/perl_tst-float.sh

diff --git a/tests/Functional.misc/tests/perl.sh b/tests/Functional.misc/tests/perl.sh
new file mode 100644
index 0000000..3adefc1
--- /dev/null
+++ b/tests/Functional.misc/tests/perl.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#  In target, run comannd perl.
+
+test="perl"
+
+if echo "print \"hello world\n\"" | perl | grep "hello world"
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi
diff --git a/tests/Functional.misc/tests/perl_tst-float.sh b/tests/Functional.misc/tests/perl_tst-float.sh
new file mode 100644
index 0000000..3c0018d
--- /dev/null
+++ b/tests/Functional.misc/tests/perl_tst-float.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+#  In target, run comannd tst-float.
+
+test="tst-float"
+
+mkdir test_dir_for_fuego
+
+cp data/tst-float.pl test_dir_for_fuego/
+
+if perl test_dir_for_fuego/tst-float.pl | grep "test:0.5"
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi
+rm -fr test_dir_for_fuego
-- 
1.8.3.1





More information about the Fuego mailing list