File: run.osh

package info (click to toggle)
omake 0.9.8.5-3-8
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 20,524 kB
  • ctags: 10,983
  • sloc: ml: 60,296; ansic: 7,127; makefile: 689; sh: 114
file content (20 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ABORT_ON_COMMAND_ERROR = false

Shell. +=
   run_foo(argv) =
      foo | grep 5.

   test_close(argv) =
      fail = false
      awk(b, $(stdin))
      case $'close[(][)]: Bad file descriptor'
         eprintln($"!!: $0")
         fail = true
         export
      default
         eprintln($"OK: $0")
      if $(fail)
         eprintln($"Test failed!")
         exit 1

(( echo Starting; run_foo; echo Done  ) |& test_close) || exit 5