• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision3991 (tree)
Time2019-03-16 12:46:46
Authormagicant

Log Message

run-test: Don't use function before defined

The eprintf function should be used after it is defined.

Change Summary

Incremental Difference

--- yash/trunk/tests/run-test.sh (revision 3990)
+++ yash/trunk/tests/run-test.sh (revision 3991)
@@ -28,14 +28,6 @@
2828 set -Ceu
2929 umask u+rwx
3030
31-# require yash for alias support and ulimit built-ins
32-if ! [ "${YASH_VERSION-}" ]; then
33- eprintf '%s: must be run with yash\n' "$0"
34- exit 64 # sysexits.h EX_USAGE
35-fi
36-
37-command -b ulimit -c 0 2>/dev/null || :
38-
3931 ##### Some utility functions and aliases
4032
4133 eprintf() {
@@ -53,6 +45,14 @@
5345
5446 ##### Script startup
5547
48+# require yash for alias support and ulimit built-ins
49+if ! [ "${YASH_VERSION-}" ]; then
50+ eprintf '%s: must be run with yash\n' "$0"
51+ exit 64 # sysexits.h EX_USAGE
52+fi
53+
54+command -b ulimit -c 0 2>/dev/null || :
55+
5656 exec </dev/null 3>&- 4>&- 5>&-
5757
5858 # ensure correctness of $PWD
Show on old repository browser