introduce a nosymlink check category (idea by RT); pass it to test.sh; use cp if ln -s fails (me)
This commit is contained in:
parent
b1aa05e36e
commit
5488e79d3b
8
Build.sh
8
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.558 2012/05/04 21:37:08 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.559 2012/05/04 21:42:50 tg Exp $'
|
||||
#-
|
||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012
|
||||
@ -498,6 +498,10 @@ BeOS)
|
||||
BSD/OS)
|
||||
: ${HAVE_SETLOCALE_CTYPE=0}
|
||||
;;
|
||||
Coherent)
|
||||
oswarn="; it has major issues"
|
||||
check_categories="$check_categories nosymlink"
|
||||
;;
|
||||
CYGWIN*)
|
||||
: ${HAVE_SETLOCALE_CTYPE=0}
|
||||
;;
|
||||
@ -1401,7 +1405,7 @@ else
|
||||
#define EXTERN
|
||||
#define MKSH_INCLUDES_ONLY
|
||||
#include "sh.h"
|
||||
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.558 2012/05/04 21:37:08 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.559 2012/05/04 21:42:50 tg Exp $");
|
||||
int main(void) { printf("Hello, World!\n"); return (0); }
|
||||
EOF
|
||||
case $cm in
|
||||
|
26
check.t
26
check.t
@ -1,4 +1,4 @@
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.534 2012/04/27 16:16:21 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.535 2012/05/04 21:42:51 tg Exp $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
@ -73,8 +73,8 @@ name: selftest-direct-builtin-call
|
||||
description:
|
||||
Check that direct builtin calls work
|
||||
stdin:
|
||||
ln -s "$__progname" cat
|
||||
ln -s "$__progname" echo
|
||||
ln -s "$__progname" cat || cp "$__progname" cat
|
||||
ln -s "$__progname" echo || cp "$__progname" echo
|
||||
./echo -c 'echo foo' | ./cat -u
|
||||
expected-stdout:
|
||||
-c echo foo
|
||||
@ -1036,7 +1036,7 @@ description:
|
||||
need-pass: no
|
||||
# the mv command fails on Cygwin
|
||||
# Hurd aborts the testsuite (permission denied)
|
||||
category: !os:cygwin,!os:gnu,!os:msys
|
||||
category: !os:cygwin,!os:gnu,!os:msys,!nosymlink
|
||||
file-setup: file 644 "x"
|
||||
mkdir noread noread/target noread/target/subdir
|
||||
ln -s noread link
|
||||
@ -1895,7 +1895,7 @@ description:
|
||||
# breaks on FreeMiNT (cannot unlink dangling symlinks)
|
||||
# breaks on MSYS (does not support symlinks)
|
||||
# breaks on Dell UNIX 4.0 R2.2 (SVR4) where unlink also fails
|
||||
category: !os:mint,!os:msys,!os:svr4.0
|
||||
category: !os:mint,!os:msys,!os:svr4.0,!nosymlink
|
||||
file-setup: dir 755 "dir"
|
||||
file-setup: symlink 644 "dir/abc"
|
||||
non-existent-file
|
||||
@ -5780,10 +5780,10 @@ description:
|
||||
Check that sh mode is *not* automatically turned on
|
||||
category: !binsh
|
||||
stdin:
|
||||
ln -s "$__progname" ksh
|
||||
ln -s "$__progname" sh
|
||||
ln -s "$__progname" ./-ksh
|
||||
ln -s "$__progname" ./-sh
|
||||
ln -s "$__progname" ksh || cp "$__progname" ksh
|
||||
ln -s "$__progname" sh || cp "$__progname" sh
|
||||
ln -s "$__progname" ./-ksh || cp "$__progname" ./-ksh
|
||||
ln -s "$__progname" ./-sh || cp "$__progname" ./-sh
|
||||
for shell in {,-}{,k}sh; do
|
||||
print -- $shell $(./$shell +l -c \
|
||||
'[[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh')
|
||||
@ -5799,10 +5799,10 @@ description:
|
||||
Check that sh mode *is* automatically turned on
|
||||
category: binsh
|
||||
stdin:
|
||||
ln -s "$__progname" ksh
|
||||
ln -s "$__progname" sh
|
||||
ln -s "$__progname" ./-ksh
|
||||
ln -s "$__progname" ./-sh
|
||||
ln -s "$__progname" ksh || cp "$__progname" ksh
|
||||
ln -s "$__progname" sh || cp "$__progname" sh
|
||||
ln -s "$__progname" ./-ksh || cp "$__progname" ./-ksh
|
||||
ln -s "$__progname" ./-sh || cp "$__progname" ./-sh
|
||||
for shell in {,-}{,k}sh; do
|
||||
print -- $shell $(./$shell +l -c \
|
||||
'[[ $(set +o) == *@(-o sh)@(| *) ]] && echo sh || echo nosh')
|
||||
|
Loading…
x
Reference in New Issue
Block a user