-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbasic.tush
More file actions
33 lines (23 loc) · 714 Bytes
/
basic.tush
File metadata and controls
33 lines (23 loc) · 714 Bytes
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
Here's a basic example of how tush should work.
$ echo '$ echo hello world' >test.tush
$ tush-run test.tush
| $ echo hello world
| | hello world
tush-check should fail because we omitted the expected output in our script:
$ tush-check test.tush >/dev/null
? 1
Here, tail -n +3 skips the first lines from 'diff -u' which include dates
that will vary from one run to the next:
$ tush-check test.tush | tail -n +3
| @@ -1 +1,2 @@
| $ echo hello world
| +| hello world
Using tush-bless we fix this test failure:
$ tush-bless test.tush
$ tush-check test.tush
$ cat test.tush
| $ echo hello world
| | hello world
There should be nothing else in this tush-scratch directory we're running in:
$ ls
| test.tush