From 9d47ae824cb210c08d9343336438375ad717fd4f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Mon, 10 Jul 2017 13:30:49 +0300 Subject: [PATCH] tests: compress test_utile_file with test_basic More code compression/de-duplication. Signed-off-by: Alexandru Ardelean --- tests/test_basic.test | 6 +++++- tests/test_util_file.test | 16 +--------------- 2 files changed, 6 insertions(+), 16 deletions(-) mode change 100755 => 120000 tests/test_util_file.test diff --git a/tests/test_basic.test b/tests/test_basic.test index 3912732..154e036 100755 --- a/tests/test_basic.test +++ b/tests/test_basic.test @@ -11,5 +11,9 @@ fi filename=$(basename "$0") filename="${filename%.*}" -run_output_test $filename +# This is only for the test_util_file.test ; +# more stuff could be extended +cp -f "$srcdir/valid.json" . + +run_output_test $filename "$srcdir" exit $? diff --git a/tests/test_util_file.test b/tests/test_util_file.test deleted file mode 100755 index 541aada..0000000 --- a/tests/test_util_file.test +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Common definitions -if test -z "$srcdir"; then - srcdir="${0%/*}" - test "$srcdir" = "$0" && srcdir=. - test -z "$srcdir" && srcdir=. -fi -. "$srcdir/test-defs.sh" - -cp -f "$srcdir/valid.json" . -run_output_test test_util_file "$srcdir" -_err=$? - -exit $_err diff --git a/tests/test_util_file.test b/tests/test_util_file.test new file mode 120000 index 0000000..58a13f4 --- /dev/null +++ b/tests/test_util_file.test @@ -0,0 +1 @@ +test_basic.test \ No newline at end of file -- 2.40.0