1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#!/bin/sh
# vim: set filetype=sh :
# file: example.ia-s
# copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
# license: GNU General Public License, version 3
# description: test that -s is silent, but script stdout is delivered
# see also: test.ia-s
# example.ia-c-s-m to test errors
set -e
set -u
. ./ia
f1()
{
eval "$ia_init"
ia_stdout "^f1$"
ia_add "echo \"f1\""
ia -c
}
f1b()
{
eval "$ia_init"
ia_ignore "^f1b$"
ia_add "echo \"f1b\""
ia -c
}
f2()
{
eval "$ia_init"
ia_stdout "^f2$"
ia_add "echo \"f2\" >&2"
ia -c
}
f2b()
{
eval "$ia_init"
ia_ignore "^f2b$"
ia_add "echo \"f2b\" >&2"
ia -c
}
f3()
{
eval "$ia_init"
ia_add "echo \"f3\""
ia -C
}
f4()
{
eval "$ia_init"
ia_ignore "^f4$"
ia_add "echo \"f4\" >&2"
ia -C
}
eval "$ia_init"
ia_add f1
ia_add f1b
ia_add f2
ia_add f2b
ia_add f3
ia_add f4
ia
|