Skip to content

Latest commit

 

History

History
1202 lines (995 loc) · 27.3 KB

portabilitytest-2014-05-21-linux.org

File metadata and controls

1202 lines (995 loc) · 27.3 KB

portabilitytest results

Fedora 20 x86_64: /bin/sh = bash 4.2.47

Modern linux distribution where the listed shells installed from rpm packages, except The Heirloom Bourne Shell run from compiled binary.

Shells: /bin/sh, /bin/ksh, /bin/bash, /bin/zsh, /bin/dash, /bin/mksh, /bin/lksh, /sbin/busybox sh, heirloom/sh

01_test_commandshkshbashzshdashmkshlkshbusybox shheirloom sh
02_test_command_vshkshbashzshdashmkshlkshbusybox shheirloom sh
03_test_cmdv_failshkshbashzshdashmkshlkshbusybox shheirloom sh
04_test_builtinshkshbashzshdashmkshlkshbusybox shheirloom sh
05_test_localshkshbashzshdashmkshlkshbusybox shheirloom sh
06_test_typesetshkshbashzshdashmkshlkshbusybox shheirloom sh
07_test_globalshkshbashzshdashmkshlkshbusybox shheirloom sh
08_test_functionshkshbashzshdashmkshlkshbusybox shheirloom sh
09_test_function2shkshbashzshdashmkshlkshbusybox shheirloom sh
10_test_exclmarkshkshbashzshdashmkshlkshbusybox shheirloom sh
11_test_testshkshbashzshdashmkshlkshbusybox shheirloom sh
12_test_test_eshkshbashzshdashmkshlkshbusybox shheirloom sh
13_test_test_efshkshbashzshdashmkshlkshbusybox shheirloom sh
14_test_test_ntshkshbashzshdashmkshlkshbusybox shheirloom sh
15_test_testexclshkshbashzshdashmkshlkshbusybox shheirloom sh
16_test_testeqeqshkshbashzshdashmkshlkshbusybox shheirloom sh
17_test_testtestshkshbashzshdashmkshlkshbusybox shheirloom sh
18_test_tildexpshkshbashzshdashmkshlkshbusybox shheirloom sh
19_test_pwdvarshkshbashzshdashmkshlkshbusybox shheirloom sh
20_test_pwdcmdshkshbashzshdashmkshlkshbusybox shheirloom sh
21_test_trueshkshbashzshdashmkshlkshbusybox shheirloom sh
22_test_colonshkshbashzshdashmkshlkshbusybox shheirloom sh
23_test_export1shkshbashzshdashmkshlkshbusybox shheirloom sh
24_test_readonly2shkshbashzshdashmkshlkshbusybox shheirloom sh
25_test_case_pxclshkshbashzshdashmkshlkshbusybox shheirloom sh
26_test_case_pxcfshkshbashzshdashmkshlkshbusybox shheirloom sh
27_test_at0shkshbashzshdashmkshlkshbusybox shheirloom sh
28_test_at1shkshbashzshdashmkshlkshbusybox shheirloom sh
29_test_at0forshkshbashzshdashmkshlkshbusybox shheirloom sh
30_test_echoEshkshbashzshdashmkshlkshbusybox shheirloom sh
31_test_echocshkshbashzshdashmkshlkshbusybox shheirloom sh
32_test_echonshkshbashzshdashmkshlkshbusybox shheirloom sh
33_test_bi_printfshkshbashzshdashmkshlkshbusybox shheirloom sh
34_test_dollar_sgshkshbashzshdashmkshlkshbusybox shheirloom sh
35_test_hash_fatlshkshbashzshdashmkshlkshbusybox shheirloom sh
36_test_hash_btinshkshbashzshdashmkshlkshbusybox shheirloom sh
37_test_hash_failshkshbashzshdashmkshlkshbusybox shheirloom sh
38_test_iexprshkshbashzshdashmkshlkshbusybox shheirloom sh
39_test_tfftshkshbashzshdashmkshlkshbusybox shheirloom sh
40_test_icatshkshbashzshdashmkshlkshbusybox shheirloom sh

common.sh

set -eu
#set -x

PATH=; export PATH

case ${BASH_VERSION-} in *.*)
	# Make echo builtin in bash expands backslash-escape sequences by
	# default. Without this bash would be less portable compared to
	# most other shells...
	shopt -s xpg_echo
	# make sure pipefail is not set (bash-only feature)...
	set +o pipefail
	#list_functions () { set; }
esac
case ${ZSH_VERSION-} in *.*)
	setopt shwordsplit
	setopt posix_builtins # for test_command()
	unsetopt equals # for [ 1 == 1 ] (nonstandard usage...)
	unsetopt bsd_echo # enable echo escape sequences (like \c)
	#setopt equals # make [ 1 == 1 ] fail for sure...
	unsetopt function_argzero # $0 being the name of this script always
	#list_functions () { functions; }
esac

withpath () { PATH=/bin:/usr/bin; export PATH; "$@"; PATH=; export PATH; }

saved_IFS=$IFS; readonly saved_IFS
set -x

01_test_command

#!/bin/sh
test_command () # builtin or system, not function or alias
{
	# one could argue whether command should include builtins...
	alias echo='exit 1' || :
	echo () { exit 1; }
	command echo
} 
. portabilitytest/common.sh
test_command

f 01_test_command heirloom sh

+ test_command 
+ alias echo=exit 1 
portabilitytest/01_test_command: alias: not found
+ : 
+ command echo 
portabilitytest/01_test_command: command: not found

1 of the tested shells failed to execute this test


02_test_command_v

#!/bin/sh
test_command_v () # the -v option
{
	# first check that there is builtin 'command'
	command echo || exit 1
	# expect cat reside in /bin, to make this run not fail
	PATH=/bin; export PATH
	case `command -v cat` in *cat) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_command_v

f 02_test_command_v heirloom sh

+ test_command_v 
+ command echo 
portabilitytest/02_test_command_v: command: not found
+ exit 1 

1 of the tested shells failed to execute this test


03_test_cmdv_fail

#!/bin/sh
test_cmdv_fail () # if command -v fails in case command not found
{
	if command -v this_c0mmand_does_not_existt
	then exit 1
	else exit 0
	fi
} 
. portabilitytest/common.sh
test_cmdv_fail

all of the tested shells executed this test successfully


04_test_builtin

#!/bin/sh
test_builtin () # builtin command
{
	echo () { return 1; }
	builtin echo
} 
. portabilitytest/common.sh
test_builtin

f 04_test_builtin dash

+ test_builtin
+ builtin echo
portabilitytest/04_test_builtin: 5: portabilitytest/04_test_builtin: builtin: not found

f 04_test_builtin busybox sh

+ test_builtin
+ builtin echo
portabilitytest/04_test_builtin: line 1: builtin: not found

f 04_test_builtin heirloom sh

+ test_builtin 
+ builtin echo 
portabilitytest/04_test_builtin: builtin: not found

3 of the tested shells failed to execute this test


05_test_local

#!/bin/sh
test_local () # local variable
{
	lt () {
		local var=ilval
		case $var in ilval) ;; *) exit 1 ;; esac
	}
	local var=lval
	lt
	case $var in lval) ;; *) exit 1 ;; esac
} 
. portabilitytest/common.sh
test_local

f 05_test_local ksh

+ test_local
+ local var=lval
portabilitytest/05_test_local[8]: local: not found [No such file or directory]

f 05_test_local heirloom sh

+ test_local 
+ local var=lval 
portabilitytest/05_test_local: local: not found

2 of the tested shells failed to execute this test


06_test_typeset

#!/bin/sh
test_typeset () # local variable using plain typeset (typeset/declare without opts)
{
	# declare: same as typeset (in bash, zsh, ...) but less portable
	lt () {
		typeset var=ilval
		case $var in ilval) ;; *) exit 1 ;; esac
	}
	typeset var=lval
	lt
	case $var in lval) ;; *) exit 1 ;; esac
} 
. portabilitytest/common.sh
test_typeset

f 06_test_typeset ksh

+ test_typeset
+ var=lval
+ typeset var
+ lt
+ var=ilval
+ typeset var
+ exit 1

f 06_test_typeset dash

+ test_typeset
+ typeset var=lval
portabilitytest/06_test_typeset: 9: portabilitytest/06_test_typeset: typeset: not found

f 06_test_typeset busybox sh

+ test_typeset
+ typeset var=lval
portabilitytest/06_test_typeset: line 1: typeset: not found

f 06_test_typeset heirloom sh

+ test_typeset 
+ typeset var=lval 
portabilitytest/06_test_typeset: typeset: not found

4 of the tested shells failed to execute this test


07_test_global

#!/bin/sh
test_global () # test whether variable is global always
{
	gt () {
		var=local
	}
	var=global
	gt
	case $var in local) exit 0 ;; *) exit 1 ;; esac
} 
. portabilitytest/common.sh
test_global

all of the tested shells executed this test successfully


08_test_function

#!/bin/sh
test_function () # function keyword
{
	function inner { :; }
	inner
} 
. portabilitytest/common.sh
test_function

f 08_test_function dash

portabilitytest/08_test_function: 5: portabilitytest/08_test_function: inner: not found
portabilitytest/08_test_function: 6: portabilitytest/08_test_function: Syntax error: "}" unexpected

f 08_test_function busybox sh

portabilitytest/08_test_function: line 5: inner: not found
portabilitytest/08_test_function: line 6: syntax error: unexpected "}"

f 08_test_function heirloom sh

portabilitytest/08_test_function: inner: not found
portabilitytest/08_test_function: syntax error at line 6: `}' unexpected

3 of the tested shells failed to execute this test


09_test_function2

#!/bin/sh
test_function2 () # function keyword, with ()
{
	function inner () { :; }
	inner
} 
. portabilitytest/common.sh
test_function2

f 09_test_function2 ksh

portabilitytest/09_test_function2: syntax error at line 4: `(' unexpected

f 09_test_function2 dash

portabilitytest/09_test_function2: 4: portabilitytest/09_test_function2: Syntax error: "(" unexpected (expecting "}")

f 09_test_function2 busybox sh

portabilitytest/09_test_function2: line 4: syntax error: unexpected "(" (expecting "}")

f 09_test_function2 heirloom sh

portabilitytest/09_test_function2: syntax error at line 4: `(' unexpected

4 of the tested shells failed to execute this test


10_test_exclmark

#!/bin/sh
test_exclmark () # whether '!' as 'not' works (and is builtin)
{
	# fails in heirloom sh
	! /bin/false
} 
. portabilitytest/common.sh
test_exclmark

f 10_test_exclmark heirloom sh

+ test_exclmark 
+ ! /bin/false 
portabilitytest/10_test_exclmark: !: not found

1 of the tested shells failed to execute this test


11_test_test

#!/bin/sh
test_test () # builtin test command
{
	test string
} 
. portabilitytest/common.sh
test_test

all of the tested shells executed this test successfully


12_test_test_e

#!/bin/sh
test_test_e () # test -e file (well, current directory)
{
	if test -e "$0"; then exit 0; else exit 1; fi
} 
. portabilitytest/common.sh
test_test_e

f 12_test_test_e heirloom sh

+ test_test_e 
+ test -e portabilitytest/12_test_test_e 
portabilitytest/12_test_test_e: test: argument expected

1 of the tested shells failed to execute this test


13_test_test_ef

#!/bin/sh
test_test_ef () # test file1 -ef file2
{
	td=`withpath mktemp -d /tmp/tmp.XXXXXX`; ev=1
	trap '/bin/rm -rf $td; exit $ev' 0
	: > $td/file1
	/bin/ln $td/file1 $td/file2
	if test $td/file1 -ef $td/file2; then ev=0; fi
} 
. portabilitytest/common.sh
test_test_ef

f 13_test_test_ef heirloom sh

+ test_test_ef 
+ withpath mktemp -d /tmp/tmp.XXXXXX 
PATH=/bin:/usr/bin
+ export PATH 
+ mktemp -d /tmp/tmp.XXXXXX 
PATH=
+ export PATH 
td=/tmp/tmp.hdTNqs
ev=1
+ trap /bin/rm -rf $td; exit $ev 0 
+ : 
+ /bin/ln /tmp/tmp.hdTNqs/file1 /tmp/tmp.hdTNqs/file2 
+ test /tmp/tmp.hdTNqs/file1 -ef /tmp/tmp.hdTNqs/file2 
portabilitytest/13_test_test_ef: test: unknown operator -ef
+ /bin/rm -rf /tmp/tmp.hdTNqs 
+ exit 1 

1 of the tested shells failed to execute this test


14_test_test_nt

#!/bin/sh
test_test_nt () # test file1 -nt file2 (presumed -ot is also supported if -nt is)
{
	td=`withpath mktemp -d /tmp/tmp.XXXXXX`; ev=1
	#trap '/bin/rm -rf $td; exit $ev' 0
	# XXX expects system time & fs times to work as usual
	: > $td/newfile
	if test $td/newfile -nt "$0"; then ev=0; fi
} 
. portabilitytest/common.sh
test_test_nt

f 14_test_test_nt heirloom sh

+ test_test_nt 
+ withpath mktemp -d /tmp/tmp.XXXXXX 
PATH=/bin:/usr/bin
+ export PATH 
+ mktemp -d /tmp/tmp.XXXXXX 
PATH=
+ export PATH 
td=/tmp/tmp.SV5p15
ev=1
+ : 
+ test /tmp/tmp.SV5p15/newfile -nt portabilitytest/14_test_test_nt 
portabilitytest/14_test_test_nt: test: unknown operator -nt

1 of the tested shells failed to execute this test


15_test_testexcl

#!/bin/sh
test_testexcl () # '!' in test
{
	if test '!' string; then exit 1; else exit 0; fi
} 
. portabilitytest/common.sh
test_testexcl

all of the tested shells executed this test successfully


16_test_testeqeq

#!/bin/sh
test_testeqeq () # nonstandard '[ 1 == 1 ]' ('[ 1 = 1 ]' would be standard one)
{
	# this can be made to pass in zsh by using '==' or w/ unsetopt equals
	[ 1 == 1 ]
} 
. portabilitytest/common.sh
test_testeqeq

f 16_test_testeqeq dash

+ test_testeqeq
+ [ 1 == 1 ]
portabilitytest/16_test_testeqeq: 5: [: 1: unexpected operator

f 16_test_testeqeq heirloom sh

+ test_testeqeq 
+ [ 1 == 1 ] 
portabilitytest/16_test_testeqeq: test: unknown operator ==

2 of the tested shells failed to execute this test


17_test_testtest

#!/bin/sh
test_testtest () # whether [[ ]] is supported (with 1 == 1)
{
	[[ 1 == 1 ]]
} 
. portabilitytest/common.sh
test_testtest

f 17_test_testtest dash

+ test_testtest
+ [[ 1 == 1 ]]
portabilitytest/17_test_testtest: 4: portabilitytest/17_test_testtest: [[: not found

f 17_test_testtest heirloom sh

+ test_testtest 
+ [[ 1 == 1 ]] 
portabilitytest/17_test_testtest: [[: not found

2 of the tested shells failed to execute this test


18_test_tildexp

#!/bin/sh
test_tildexp () # tilde expansion
{
	case ~ in /*) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_tildexp

f 18_test_tildexp heirloom sh

+ test_tildexp 
+ exit 1 

1 of the tested shells failed to execute this test


19_test_pwdvar

#!/bin/sh
test_pwdvar () # '$PWD' variable expansion
{
	cd /tmp
	PWD=/usr
	echo \$PWD: $PWD
	cd .
	echo \$PWD: $PWD
	case $PWD in /tmp) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_pwdvar

f 19_test_pwdvar heirloom sh

+ test_pwdvar 
+ cd /tmp 
PWD=/usr
+ echo $PWD: /usr 
$PWD: /usr
+ cd . 
+ echo $PWD: /usr 
$PWD: /usr
+ exit 1 

1 of the tested shells failed to execute this test


20_test_pwdcmd

#!/bin/sh
test_pwdcmd () # pwd builtin command
{
	pwd
} 
. portabilitytest/common.sh
test_pwdcmd

all of the tested shells executed this test successfully


21_test_true

#!/bin/sh
test_true () # true builtin command (cannot test false...)
{
	true
} 
. portabilitytest/common.sh
test_true

f 21_test_true heirloom sh

+ test_true 
+ true 
portabilitytest/21_test_true: true: not found

1 of the tested shells failed to execute this test


22_test_colon

#!/bin/sh
test_colon () # colon (:) builtin command
{
	:
} 
. portabilitytest/common.sh
test_colon

all of the tested shells executed this test successfully


23_test_export1

#!/bin/sh
test_export1 () # export VAR=val -- not bourne compatible
{
	export VAR=val
	case $VAR in val) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_export1

f 23_test_export1 heirloom sh

+ test_export1 
+ export VAR=val 
portabilitytest/23_test_export1: VAR=val: is not an identifier

1 of the tested shells failed to execute this test


24_test_readonly2

#!/bin/sh
test_readonly2 () # VAR=val; readonly VAR -- then attempt to change VAR
{
	VAR=val; readonly VAR
	# running in subshell as this makes shell exit.
	( VAR=changed || : ) && exit 1 || :
} 
. portabilitytest/common.sh
test_readonly2

all of the tested shells executed this test successfully


25_test_case_pxcl

#!/bin/sh
test_case_pxcl () # case where both '*' and '[!a-z0-9_]' unquoted
{
	case test/echo1 in *[!a-z0-9_]*) ;; *) exit 1; esac
	case test_echo1 in *[!a-z0-9_]*) exit 1; esac
} 
. portabilitytest/common.sh
test_case_pxcl

all of the tested shells executed this test successfully


26_test_case_pxcf

#!/bin/sh
test_case_pxcf () # case where both '*' and '[^a-z0-9_]' unquoted
{
	# dash & heirloom sh expected to "fail" here.
	case test/echo1 in *[^a-z0-9_]*) ;; *) exit 1; esac
	case test_echo1 in *[^a-z0-9_]*) exit 1; esac
} 
. portabilitytest/common.sh
test_case_pxcf

f 26_test_case_pxcf dash

+ test_case_pxcf
+ exit 1

f 26_test_case_pxcf mksh

+ test_case_pxcf
+ exit 1

f 26_test_case_pxcf lksh

+ test_case_pxcf
+ exit 1

f 26_test_case_pxcf heirloom sh

portabilitytest/26_test_case_pxcf: syntax error at line 5: `^' unexpected

4 of the tested shells failed to execute this test


27_test_at0

#!/bin/sh
test_at0 () # "$@" expansion when $# 0
{
	case $# in 0) ;; *) die "arg count 0 required for this test" ;; esac
	: "$@"
} 
. portabilitytest/common.sh
test_at0

f 27_test_at0 heirloom sh

+ test_at0 
portabilitytest/27_test_at0: @: parameter not set

1 of the tested shells failed to execute this test


28_test_at1

#!/bin/sh
test_at1 () # ${1+"$@"} expansion when $# 0
{
	case $# in 0) ;; *) die "arg count 0 required for this test" ;; esac
	: ${1+"$@"}
} 
. portabilitytest/common.sh
test_at1

all of the tested shells executed this test successfully


29_test_at0for

#!/bin/sh
test_at0for () # implicit "$@" in for loop
{
	case $# in 0) ;; *) die "arg count 0 required for this test" ;; esac
	# FreeBSD 7.1 /bin/sh will complain something like $@ not defined
	for var; do :; done
} 
. portabilitytest/common.sh
test_at0for

f 29_test_at0for heirloom sh

portabilitytest/29_test_at0for: syntax error at line 6: `;' unexpected

1 of the tested shells failed to execute this test


30_test_echoE

#!/bin/sh
test_echoE () # expect backslash-escapes to be escapes by default
{
	case `echo '\n' | withpath wc` in *2*0*2) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_echoE

f 30_test_echoE ksh

+ test_echoE
+ echo '\n'
+ withpath wc
+ PATH=/bin:/usr/bin
+ export PATH
+ wc
+ PATH=''
+ export PATH
+ exit 1

f 30_test_echoE busybox sh

+ test_echoE
+ echo \n
+ withpath wc
+ PATH=/bin:/usr/bin
+ export PATH
+ wc
+ PATH=
+ export PATH
+ exit 1

2 of the tested shells failed to execute this test


31_test_echoc

#!/bin/sh
test_echoc () # expect '\c' to stop producing more output
{
	case `echo '\c---'` in '') ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_echoc

f 31_test_echoc ksh

+ test_echoc
+ echo '\c---'
+ exit 1

f 31_test_echoc mksh

+ test_echoc
+ echo '\c---'
+ exit 1

f 31_test_echoc lksh

+ test_echoc
+ echo '\c---'
+ exit 1

f 31_test_echoc busybox sh

+ test_echoc
+ echo \c---
+ exit 1

4 of the tested shells failed to execute this test


32_test_echon

#!/bin/sh
test_echon () # whether 'echo -n' works
{
	echo -n
	case `echo -n` in '') ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_echon

f 32_test_echon sh

+ test_echon
+ echo -n
-n
+ case `echo -n` in
++ echo -n
+ exit 1

f 32_test_echon heirloom sh

+ test_echon 
+ echo -n 
-n
+ echo -n 
+ exit 1 

2 of the tested shells failed to execute this test


33_test_bi_printf

#!/bin/sh
test_bi_printf () # builtin printf
{
	case `printf '%s' tstr` in tstr) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_bi_printf

f 33_test_bi_printf mksh

+ test_bi_printf
+ printf %s tstr
portabilitytest/33_test_bi_printf[7]: printf: not found
+ exit 1

f 33_test_bi_printf lksh

+ test_bi_printf
+ printf %s tstr
portabilitytest/33_test_bi_printf[7]: printf: not found
+ exit 1

f 33_test_bi_printf heirloom sh

+ test_bi_printf 
+ printf %s tstr 
portabilitytest/33_test_bi_printf: printf: not found

3 of the tested shells failed to execute this test


34_test_dollar_sg

#!/bin/sh
test_dollar_sg () # dollar-single expansion
{
	x=$'\n'
	case $x in ?) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_dollar_sg

f 34_test_dollar_sg dash

+ test_dollar_sg
+ x=$\n
+ exit 1

f 34_test_dollar_sg heirloom sh

+ test_dollar_sg 
x=$\n
+ exit 1 

2 of the tested shells failed to execute this test


35_test_hash_fatl

#!/bin/sh
test_hash_fatl () # some shells (heirloom sh) exits when hash fails
{
	if hash xxx_no_such_prog
	then :
	fi
} 
. portabilitytest/common.sh
test_hash_fatl

f 35_test_hash_fatl heirloom sh

+ test_hash_fatl 
+ hash xxx_no_such_prog 
portabilitytest/35_test_hash_fatl: xxx_no_such_prog: not found

1 of the tested shells failed to execute this test


36_test_hash_btin

#!/bin/sh
test_hash_btin () # if there is builtin hash
{
	hash /bin/sh || hash sh=/bin/sh # latter for zsh
} 
. portabilitytest/common.sh
test_hash_btin

all of the tested shells executed this test successfully


37_test_hash_fail

#!/bin/sh
test_hash_fail () # if hash fails in case command not found
{
	if (hash this_c0mmand_does_not_existt) # in subshell for heirloom sh...
	then exit 1
	else exit 0
	fi
} 
. portabilitytest/common.sh
test_hash_fail

f 37_test_hash_fail ksh

+ test_hash_fail
+ alias -t -- this_c0mmand_does_not_existt
+ exit 1

f 37_test_hash_fail mksh

+ test_hash_fail
+ alias -t this_c0mmand_does_not_existt
+ exit 1

f 37_test_hash_fail lksh

+ test_hash_fail
+ alias -t this_c0mmand_does_not_existt
+ exit 1

3 of the tested shells failed to execute this test


38_test_iexpr

#!/bin/sh
test_iexpr () # $((a + b))
{
	a=1 b=2
	c=$((a + b))
	case $c in 3) ;; *) exit 1; esac
} 
. portabilitytest/common.sh
test_iexpr

f 38_test_iexpr heirloom sh

portabilitytest/38_test_iexpr: syntax error at line 5: `c=$' unexpected

1 of the tested shells failed to execute this test


39_test_tfft

#!/bin/sh
test_tfft () # true && false && false || true
{
	_false () { return 1; }
	: && _false && _false || :
} 
. portabilitytest/common.sh
test_tfft

all of the tested shells executed this test successfully


40_test_icat

#!/bin/sh
test_icat () # whether there is $(< file)
{
	d=$(< "$0")
	case $d in '') exit 1; esac
} 
. portabilitytest/common.sh
test_icat

f 40_test_icat dash

+ test_icat
+ 
+ d=
+ exit 1

f 40_test_icat busybox sh

+ test_icat
+ 
+ d=
+ exit 1

f 40_test_icat heirloom sh

portabilitytest/40_test_icat: syntax error at line 4: `d=$' unexpected

3 of the tested shells failed to execute this test