Commit 60966b2c authored by Niels Möller's avatar Niels Möller
Browse files

* src/sftp/testsuite: Adapted shell scripts to /bin/sh. Removed

uses of the "function" keyword, and use a full path when sourcing
common.sh.

* src/sftp/testsuite/run-tests: Use /bin/bash, as we use
bash-specific parameter expansion.

Rev: src/sftp/testsuite/common.sh:1.3
Rev: src/sftp/testsuite/connect-test:1.2
Rev: src/sftp/testsuite/get-1-test:1.2
Rev: src/sftp/testsuite/ls-1-test:1.2
Rev: src/sftp/testsuite/ls-2-test:1.2
Rev: src/sftp/testsuite/run-tests:1.3
Rev: src/sftp/testsuite/setup-env:1.3
Rev: src/sftp/testsuite/teardown-env:1.3
parent 34e2e025
...@@ -15,7 +15,7 @@ else ...@@ -15,7 +15,7 @@ else
SERVER=sftp-server SERVER=sftp-server
fi fi
function client () { client () {
(cd $TESTHOME && "$PROGRAMDIR"/sftp-test-client "$PROGRAMDIR"/"$SERVER" "$@") (cd $TESTHOME && "$PROGRAMDIR"/sftp-test-client "$PROGRAMDIR"/"$SERVER" "$@")
} }
#! /bin/sh #! /bin/sh
. common.sh . ./common.sh
client client
#! /bin/sh #! /bin/sh
. common.sh . ./common.sh
client get "x1" | grep -q foo client get "x1" | grep -q foo
......
#! /bin/sh #! /bin/sh
. common.sh . ./common.sh
# Match the d directory # Match the d directory
client ls "" | grep -q '^d.* d$' client ls "" | grep -q '^d.* d$'
......
#! /bin/sh #! /bin/sh
. common.sh . ./common.sh
# Match the d directory # Match the d directory
client ls "d" | grep -q ' x3$' client ls "d" | grep -q ' x3$'
......
#! /bin/sh #! /bin/bash
failed=0 failed=0
all=0 all=0
function env_program () { env_program () {
if [ -x ./"$1" ] ; then if [ -x ./"$1" ] ; then
if ./"$1"; then : ; else if ./"$1"; then : ; else
echo FAIL: $1 echo FAIL: $1
...@@ -12,7 +12,7 @@ function env_program () { ...@@ -12,7 +12,7 @@ function env_program () {
fi fi
} }
function test_program () { test_program () {
if "./$1" ; then if "./$1" ; then
echo PASS: ${1%-test} echo PASS: ${1%-test}
else else
......
#! /bin/sh #! /bin/sh
. common.sh . ./common.sh
# Clean up first. # Clean up first.
rm -rf $TESTHOME rm -rf $TESTHOME
......
#! /bin/sh #! /bin/sh
. common.sh . ./common.sh
rm -rf $TESTHOME rm -rf $TESTHOME
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment