File: ulimit-y.tst

package info (click to toggle)
yash 2.60-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,152 kB
  • sloc: ansic: 34,578; makefile: 851; sh: 808; sed: 16
file content (61 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download
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
# ulimit-y.tst: yash-specific test of the ulimit built-in

if ! testee -c 'command -bv ulimit' >/dev/null; then
    skip="true"
fi

test_Oe -e 2 'too many operands (w/o -a)'
ulimit 0 0
__IN__
ulimit: too many operands are specified
__ERR__

test_Oe -e 2 'too many operands (with -a)'
ulimit -a 0
__IN__
ulimit: no operand is expected
__ERR__

test_Oe -e 2 'invalid option --xxx'
ulimit --no-such=option
__IN__
ulimit: `--no-such=option' is not a valid option
__ERR__
#'
#`

test_Oe -e 2 'specifying -a and -f at once'
ulimit -a -f
__IN__
ulimit: the -a option cannot be used with the -f option
__ERR__

test_Oe -e 2 'invalid operand (non-numeric)'
ulimit X
__IN__
ulimit: `X' is not a valid integer
__ERR__
#'
#`

test_Oe -e 2 'invalid operand (non-integral)'
ulimit 1.0
__IN__
ulimit: `1.0' is not a valid integer
__ERR__
#'
#`

test_Oe -e 2 'invalid operand (negative)'
ulimit -- -1
__IN__
ulimit: `-1' is not a valid integer
__ERR__
#'
#`

test_O -d -e 1 'printing to closed output stream'
ulimit >&-
__IN__

# vim: set ft=sh ts=8 sts=4 sw=4 et: