diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-02-06 22:28:44 +0100 |
---|---|---|
committer | Dr. Tilmann Bubeck <tilmann@bubecks.de> | 2021-11-29 12:24:35 +0100 |
commit | d6d1423fabdaec25d4a677e794f91a91f7c09c70 (patch) | |
tree | 0542b829eef22696ab71b1a30ae316786e87365e | |
parent | 477307d00c1220f8594622e1af982fb0e4e215bf (diff) | |
download | xorg-app-xauth-d6d1423fabdaec25d4a677e794f91a91f7c09c70.tar.gz |
Improve portability
there is no need to hard depend on bash given almost all the code is
/bin/sh compliant
Remove the function keyword from setup-source to make it /bin/sh
compliant
pipe wc -l output to xargs to make the command output compatible with
both GNU wc and BSD wc (which prefix the output with a tab)
-rwxr-xr-x | tests/010-xauth-add-inet.script | 2 | ||||
-rwxr-xr-x | tests/020-xauth-add-local.script | 4 | ||||
-rwxr-xr-x | tests/030-xauth-extract.script | 2 | ||||
-rwxr-xr-x | tests/040-xauth-source.script | 2 | ||||
-rwxr-xr-x | tests/090-xauth-bad-usage.script | 2 | ||||
-rw-r--r-- | tests/setup-sourced | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/010-xauth-add-inet.script b/tests/010-xauth-add-inet.script index 97fe2af..685cdd7 100755 --- a/tests/010-xauth-add-inet.script +++ b/tests/010-xauth-add-inet.script @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # setup the test ennvironment inside this shell . setup-sourced diff --git a/tests/020-xauth-add-local.script b/tests/020-xauth-add-local.script index 06850e3..71d0752 100755 --- a/tests/020-xauth-add-local.script +++ b/tests/020-xauth-add-local.script @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # setup the test ennvironment inside this shell . setup-sourced @@ -11,7 +11,7 @@ xauth add :3.5 . b90b0fd1cf6a0e7a2c74c00000000007 xauth add :4 . b90b0fd1cf6a0e7a2c74c00000000004 # List the number of entries added -xauth list | wc -l +xauth list | wc -l | xargs echo # Try to match them and print cookie xauth list unix:0 | awk '{print $3}' diff --git a/tests/030-xauth-extract.script b/tests/030-xauth-extract.script index 6db520f..2327788 100755 --- a/tests/030-xauth-extract.script +++ b/tests/030-xauth-extract.script @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # setup the test ennvironment inside this shell . setup-sourced diff --git a/tests/040-xauth-source.script b/tests/040-xauth-source.script index 9909204..01c27ab 100755 --- a/tests/040-xauth-source.script +++ b/tests/040-xauth-source.script @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # setup the test ennvironment inside this shell . setup-sourced diff --git a/tests/090-xauth-bad-usage.script b/tests/090-xauth-bad-usage.script index 9f688be..8a1e2ff 100755 --- a/tests/090-xauth-bad-usage.script +++ b/tests/090-xauth-bad-usage.script @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # setup the test ennvironment inside this shell . setup-sourced diff --git a/tests/setup-sourced b/tests/setup-sourced index 2ed1a6b..e28773b 100644 --- a/tests/setup-sourced +++ b/tests/setup-sourced @@ -11,14 +11,14 @@ export XAUTHORITY=${DATADIR:-/tmp}/.Xauthority # Start a new authority file rm -f $XAUTHORITY ; touch $XAUTHORITY -function xauth() +xauth() { echo "> xauth" "$@" ../xauth "$@" echo " exits with $?" } -function xauth_silent() +xauth_silent() { echo "> xauth" "some silent commands which should not be logged..." ../xauth "$@" |