You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/man/man1/bash_unit.1
+10-3
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
.\" Title: bash_unit
3
3
.\" Author: [see the "AUTHORS" section]
4
4
.\" Generator: Asciidoctor 1.5.5
5
-
.\" Date: 2018-01-30
5
+
.\" Date: 2020-01-18
6
6
.\" Manual: \ \&
7
7
.\" Source: \ \&
8
8
.\" Language: English
9
9
.\"
10
-
.TH "BASH_UNIT" "1" "2018-01-30" "\ \&" "\ \&"
10
+
.TH "BASH_UNIT" "1" "2020-01-18" "\ \&" "\ \&"
11
11
.ie\n(.g .dsAq\(aq
12
12
.el .dsAq '
13
13
.ss\n[.ss]0
@@ -725,7 +725,7 @@ bash \-c ps
725
725
.RS4
726
726
.\}
727
727
.nf
728
-
bash: line 1: _ps: command not found
728
+
environment: line 1: _ps: command not found
729
729
.fi
730
730
.ifn\{\
731
731
.RE
@@ -762,6 +762,13 @@ hello world
762
762
\fBfake\fP is also limited by the fact that it defines a \fIbash\fP function to
763
763
override the actual command. In some context the command can not be
764
764
overriden by a function. For instance if your code under test relies on \fIexec\fP to launch \fIps\fP, \fBfake\fP will have no effect.
765
+
.sp
766
+
\fBfake\fP may also imply strange behaviors from bash_unit when you try to
767
+
fake really basic stuff. bash_unit tries to be as much immune to this as
768
+
possible but there are some limits. Especially and as surprising as it
769
+
might seem, bash allows creating functions named after builtin commands
770
+
and bash_unit won\(cqt resist that kind of situation. So, for instance, do
771
+
not try to fake: \f[CR]exit\fP; \f[CR]local\fP; \f[CR]trap\fP; \f[CR]eval\fP; \f[CR]export\fP; \f[CR]if\fP; \f[CR]then\fP; \f[CR]else\fP; \f[CR]fi\fP; \f[CR]while\fP; \f[CR]do\fP; \f[CR]done\fP; \f[CR]$\fP; \f[CR]echo\fP; \f[CR][\fP (I know, this is not a builtin but don\(cqt).
765
772
.SS "\fBfake\fP parameters"
766
773
.sp
767
774
\fBfake\fP stores parameters given to the fake in the global variable \fIFAKE_PARAMS\fP so that you can use them inside your fake.
0 commit comments