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
SERVER=sftp-server
fi
function client () {
client () {
(cd $TESTHOME && "$PROGRAMDIR"/sftp-test-client "$PROGRAMDIR"/"$SERVER" "$@")
}
#! /bin/sh
. common.sh
. ./common.sh
client
#! /bin/sh
. common.sh
. ./common.sh
client get "x1" | grep -q foo
......
#! /bin/sh
. common.sh
. ./common.sh
# Match the d directory
client ls "" | grep -q '^d.* d$'
......
#! /bin/sh
. common.sh
. ./common.sh
# Match the d directory
client ls "d" | grep -q ' x3$'
......
#! /bin/sh
#! /bin/bash
failed=0
all=0
function env_program () {
env_program () {
if [ -x ./"$1" ] ; then
if ./"$1"; then : ; else
echo FAIL: $1
......@@ -12,7 +12,7 @@ function env_program () {
fi
}
function test_program () {
test_program () {
if "./$1" ; then
echo PASS: ${1%-test}
else
......
#! /bin/sh
. common.sh
. ./common.sh
# Clean up first.
rm -rf $TESTHOME
......
#! /bin/sh
. common.sh
. ./common.sh
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