test
: Use POSIX-compliant example for equals comparison (#11728)
* [: use posix-compliant example for equals comparison the previous example worked fine for bash, but some other shells (zsh, in my case) will not work when using "==" for comparison. the posix spec only requires "=", so I think it makes a little more sense to use that in the example. * test: use posix-compliant example for equals comparison the previous example worked fine for bash, but some other shells (zsh, in my case) will not work when using "==" for comparison. the posix spec only requires "=", so I think it makes a little more sense to use that in the example.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
- Test if a given variable is equal/not equal to the specified string:
|
||||
|
||||
`[ "${{variable}}" {{==|!=}} "{{string}}" ]`
|
||||
`[ "${{variable}}" {{=|!=}} "{{string}}" ]`
|
||||
|
||||
- Test if a given variable is [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater than or [e]qual/[l]ess than or [e]qual to the specified number:
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
- Test if a given variable is equal to a given string:
|
||||
|
||||
`test "{{$MY_VAR}}" == "{{/bin/zsh}}"`
|
||||
`test "{{$MY_VAR}}" = "{{/bin/zsh}}"`
|
||||
|
||||
- Test if a given variable is empty:
|
||||
|
||||
|
Reference in New Issue
Block a user