Permalink
Browse files
Add a stub for set +C because yash's configure script uses it.
For now, I didn't implement set -C.
- Loading branch information...
Showing
with
28 additions
and
7 deletions.
-
+4
−6
benchmarks/runtime.sh
-
+2
−0
core/state.py
-
+21
−0
spec/sh-options.test.sh
-
+1
−1
test/spec.sh
|
|
@@ -69,10 +69,6 @@ configure-twice() { |
|
|
configure-and-copy $dir $OSH $TAR_DIR/${label}__osh
|
|
|
}
|
|
|
|
|
|
|
|
|
# TODO: Run under bash and osh. Look for all the files that changed? Using
|
|
|
# 'find'? And then diff them.
|
|
|
|
|
|
yash() {
|
|
|
configure-twice $TAR_DIR/yash-2.46
|
|
|
}
|
|
|
@@ -89,7 +85,7 @@ uftrace() { |
|
|
#configure-and-show-new $TAR_DIR/uftrace-0.8.1
|
|
|
}
|
|
|
|
|
|
# Flags are different.
|
|
|
# Works for bash/dash/osh!
|
|
|
ocaml() {
|
|
|
configure-twice $TAR_DIR/ocaml-4.06.0
|
|
|
#mkdir -p _tmp/ocaml
|
|
|
@@ -98,7 +94,9 @@ ocaml() { |
|
|
|
|
|
# Same problem as tcc
|
|
|
qemu-old() {
|
|
|
configure-and-show-new ~/src/qemu-1.6.0
|
|
|
local out_dir=$PWD/_tmp/qemu-old
|
|
|
mkdir -p $out_dir
|
|
|
configure-and-copy ~/src/qemu-1.6.0 $OSH $out_dir
|
|
|
}
|
|
|
|
|
|
"$@"
|
|
|
@@ -70,6 +70,7 @@ def Set(self, b): |
|
|
('u', 'nounset'),
|
|
|
('x', 'xtrace'),
|
|
|
('f', 'noglob'),
|
|
|
('C', 'noclobber'),
|
|
|
(None, 'pipefail'),
|
|
|
|
|
|
(None, 'debug-completion'),
|
|
|
@@ -88,6 +89,7 @@ def __init__(self): |
|
|
self.xtrace = False # NOTE: uses PS4
|
|
|
self.noglob = False # -f
|
|
|
self.noexec = False # -n
|
|
|
self.noclobber = False # -C
|
|
|
self.debug_completion = False
|
|
|
|
|
|
# shopt -s / -u
|
|
|
|
|
|
@@ -185,3 +185,24 @@ shopt -p nullglob |
|
|
# stdout-json: "shopt -u nullglob\nshopt -s nullglob\n"
|
|
|
# N-I dash/mksh stdout-json: ""
|
|
|
# N-I dash/mksh status: 127
|
|
|
|
|
|
### noclobber off
|
|
|
set -o errexit
|
|
|
echo foo > $TMP/can-clobber
|
|
|
set +C
|
|
|
echo foo > $TMP/can-clobber
|
|
|
set +o noclobber
|
|
|
echo foo > $TMP/can-clobber
|
|
|
cat $TMP/can-clobber
|
|
|
# stdout: foo
|
|
|
|
|
|
### noclobber on
|
|
|
# Not implemented yet.
|
|
|
rm $TMP/no-clobber
|
|
|
set -C
|
|
|
echo foo > $TMP/no-clobber
|
|
|
echo $?
|
|
|
echo foo > $TMP/no-clobber
|
|
|
echo $?
|
|
|
# stdout-json: "0\n1\n"
|
|
|
# OK dash stdout-json: "0\n2\n"
|
|
|
@@ -406,7 +406,7 @@ var-sub-quote() { |
|
|
}
|
|
|
|
|
|
sh-options() {
|
|
|
sh-spec spec/sh-options.test.sh --osh-failures-allowed 2 \
|
|
|
sh-spec spec/sh-options.test.sh --osh-failures-allowed 3 \
|
|
|
${REF_SHELLS[@]} $OSH "$@"
|
|
|
}
|
|
|
|
|
|
|
0 comments on commit
21c675f