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
|
stdin input.sh
! exec shfmt -d
cmp stdout input.sh.stdindiff
! stderr .
stdin input.sh
! exec shfmt --diff
cmp stdout input.sh.stdindiff
! stderr .
! exec shfmt -d input.sh
cmp stdout input.sh.filediff
! stderr .
! exec shfmt -d input.sh input.sh
stdout -count=2 'input.sh.orig'
env FORCE_COLOR=true
stdin input.sh
! exec shfmt -d
stdout '\x1b\[31m- foo'
! stderr .
env FORCE_COLOR=
! exec shfmt -d .
cmp stdout input.sh.filediff
! stderr .
-- input.sh --
foo
bar
-- input.sh.golden --
foo
bar
-- input.sh.stdindiff --
--- <standard input>.orig
+++ <standard input>
@@ -1,4 +1,3 @@
- foo
+foo
-
bar
-- input.sh.filediff --
--- input.sh.orig
+++ input.sh
@@ -1,4 +1,3 @@
- foo
+foo
-
bar
|