-
Notifications
You must be signed in to change notification settings - Fork 6
/
test_margin.bashtest
60 lines (45 loc) · 1.09 KB
/
test_margin.bashtest
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
This is an example with the margin! and additional comments!
$ cd ./testsuit/statutil && python ../../bashtest.py -v *.bashtest
Trying:
run('ls testsuit/')
Expecting:
foo.py main.py
<BLANKLINE>
ok
Trying:
run('./stat.sh testsuit/')
Expecting:
Evaluate *.py statistics
PYTHON FILES: 2
PYTHON LINES: 4
<BLANKLINE>
ok
Trying:
run('./stat.sh')
Expecting:
Evaluate *.py statistics
PYTHON FILES: 3
PYTHON LINES: 8
<BLANKLINE>
ok
1 items passed all tests:
3 tests in tests.bashtest
3 tests in 1 items.
3 passed and 0 failed.
Test passed.
This is just text. It will be ignored!
$ cat ./testsuit/nginx.log | cut -f3 -d ' ' | sort | uniq -c | sort -g -r
5 92.248.130.149
3 50.112.95.211
3 109.173.101.89
2 54.251.34.67
2 54.248.250.232
2 184.73.237.85
1 54.247.188.179
Another example!
The best test is:
$ echo -e "\n\n\n\n1\n\n2\n\n\n3"
1
2
3
eof!