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/assertions.md
+35-35Lines changed: 35 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ function test_failure() {
113
113
114
114
Reports an error if`needle` is not a substring of `haystack`.
115
115
116
-
[assert_not_contains](#assert-not-contains) is the inverse of this assertion and takes the same arguments.
116
+
- [assert_not_contains](#assert-not-contains) is the inverse of this assertion and takes the same arguments.
117
117
118
118
::: code-group
119
119
```bash [Example]
@@ -150,7 +150,7 @@ function test_failure() {
150
150
151
151
Reports an error if`actual` is not empty.
152
152
153
-
[assert_not_empty](#assert-not-empty) is the inverse of this assertion and takes the same arguments.
153
+
- [assert_not_empty](#assert-not-empty) is the inverse of this assertion and takes the same arguments.
154
154
155
155
::: code-group
156
156
```bash [Example]
@@ -169,7 +169,7 @@ function test_failure() {
169
169
170
170
Reports an error if`value` does not match the regular expression `pattern`.
171
171
172
-
[assert_not_matches](#assert-not-matches) is the inverse of this assertion and takes the same arguments.
172
+
- [assert_not_matches](#assert-not-matches) is the inverse of this assertion and takes the same arguments.
173
173
174
174
::: code-group
175
175
```bash [Example]
@@ -188,7 +188,7 @@ function test_failure() {
188
188
189
189
Reports an error if`haystack` does not starts with `needle`.
190
190
191
-
[assert_string_not_starts_with](#assert-string-not-starts-with) is the inverse of this assertion and takes the same arguments.
191
+
- [assert_string_not_starts_with](#assert-string-not-starts-with) is the inverse of this assertion and takes the same arguments.
192
192
193
193
::: code-group
194
194
```bash [Example]
@@ -207,7 +207,7 @@ function test_failure() {
207
207
208
208
Reports an error if`haystack` does not ends with `needle`.
209
209
210
-
[assert_string_not_ends_with](#assert-string-not-ends-with) is the inverse of this assertion and takes the same arguments.
210
+
- [assert_string_not_ends_with](#assert-string-not-ends-with) is the inverse of this assertion and takes the same arguments.
211
211
212
212
::: code-group
213
213
```bash [Example]
@@ -247,7 +247,7 @@ function test_failure() {
247
247
248
248
Reports an error if`actual` is not less than `expected`.
249
249
250
-
[assert_greater_than](#assert-greater-than) is the inverse of this assertion and takes the same arguments.
250
+
- [assert_greater_than](#assert-greater-than) is the inverse of this assertion and takes the same arguments.
251
251
252
252
::: code-group
253
253
```bash [Example]
@@ -266,7 +266,7 @@ function test_failure() {
266
266
267
267
Reports an error if`actual` is not less than or equal to `expected`.
268
268
269
-
[assert_greater_than](#assert-greater-or-equal-than) is the inverse of this assertion and takes the same arguments.
269
+
- [assert_greater_than](#assert-greater-or-equal-than) is the inverse of this assertion and takes the same arguments.
270
270
271
271
::: code-group
272
272
```bash [Example]
@@ -289,7 +289,7 @@ function test_failure() {
289
289
290
290
Reports an error if`actual` is not greater than `expected`.
291
291
292
-
[assert_less_than](#assert-less-than) is the inverse of this assertion and takes the same arguments.
292
+
- [assert_less_than](#assert-less-than) is the inverse of this assertion and takes the same arguments.
293
293
294
294
::: code-group
295
295
```bash [Example]
@@ -308,7 +308,7 @@ function test_failure() {
308
308
309
309
Reports an error if`actual` is not greater than or equal to `expected`.
310
310
311
-
[assert_less_or_equal_than](#assert-less-or-equal-than) is the inverse of this assertion and takes the same arguments.
311
+
- [assert_less_or_equal_than](#assert-less-or-equal-than) is the inverse of this assertion and takes the same arguments.
312
312
313
313
::: code-group
314
314
```bash [Example]
@@ -333,7 +333,7 @@ Reports an error if the exit code of `callable` is not equal to `expected`.
333
333
334
334
If `callable` is not provided, it takes the last executed command or functioninstead.
335
335
336
-
[assert_successful_code](#assert-successful-code), [assert_unsuccessful_code](#assert-unsuccessful-code), [assert_general_error](#assert-general-error) and [assert_command_not_found](#assert-command-not-found)
336
+
- [assert_successful_code](#assert-successful-code), [assert_unsuccessful_code](#assert-unsuccessful-code), [assert_general_error](#assert-general-error) and [assert_command_not_found](#assert-command-not-found)
337
337
are more semantic versions of this assertion, for which you don't need to specify an exit code.
338
338
339
339
::: code-group
@@ -396,7 +396,7 @@ function test_failure() {
396
396
397
397
Reports an error if `needle` is not an element of `haystack`.
398
398
399
-
[assert_array_not_contains](#assert-array-not-contains) is the inverse of this assertion and takes the same arguments.
399
+
- [assert_array_not_contains](#assert-array-not-contains) is the inverse of this assertion and takes the same arguments.
400
400
401
401
::: code-group
402
402
```bash [Example]
@@ -421,7 +421,7 @@ Reports an error if the exit code of `callable` is not successful (`0`).
421
421
422
422
If `callable` is not provided, it takes the last executed command or function instead.
423
423
424
-
[assert_exit_code](#assert-exit-code) is the full version of this assertion where you can specify the expected exit code.
424
+
- [assert_exit_code](#assert-exit-code) is the full version of this assertion where you can specify the expected exit code.
425
425
426
426
::: code-group
427
427
```bash [Example]
@@ -499,7 +499,7 @@ Reports an error if the exit code of `callable` is not a general error (`1`).
499
499
500
500
If `callable` is not provided, it takes the last executed command or function instead.
501
501
502
-
[assert_exit_code](#assert-exit-code) is the full version of this assertion where you can specify the expected exit code.
502
+
- [assert_exit_code](#assert-exit-code) is the full version of this assertion where you can specify the expected exit code.
503
503
504
504
::: code-group
505
505
```bash [Example]
@@ -539,7 +539,7 @@ In other words, if executing `callable` does not return a command not found exit
539
539
540
540
If `callable` is not provided, it takes the last executed command or function instead.
541
541
542
-
[assert_exit_code](#assert-exit-code) is the full version of this assertion where you can specify the expected exit code.
542
+
- [assert_exit_code](#assert-exit-code) is the full version of this assertion where you can specify the expected exit code.
543
543
544
544
::: code-group
545
545
```bash [Example]
@@ -564,7 +564,7 @@ function test_failure() {
564
564
565
565
Reports an error if `file` does not exists, or it is a directory.
566
566
567
-
[assert_file_not_exists](#assert-file-not-exists) is the inverse of this assertion and takes the same arguments.
567
+
- [assert_file_not_exists](#assert-file-not-exists) is the inverse of this assertion and takes the same arguments.
568
568
569
569
::: code-group
570
570
```bash [Example]
@@ -590,7 +590,7 @@ function test_failure() {
590
590
591
591
Reports an error if `file` does not contains the search string.
592
592
593
-
[assert_file_not_contains](#assert-file-not-contains) is the inverse of this assertion and takes the same arguments.
593
+
- [assert_file_not_contains](#assert-file-not-contains) is the inverse of this assertion and takes the same arguments.
594
594
595
595
::: code-group
596
596
```bash [Example]
@@ -665,7 +665,7 @@ function test_failure() {
665
665
666
666
Reports an error if `directory` does not exist.
667
667
668
-
[assert_directory_not_exists](#assert-directory-not-exists) is the inverse of this assertion and takes the same arguments.
668
+
- [assert_directory_not_exists](#assert-directory-not-exists) is the inverse of this assertion and takes the same arguments.
669
669
670
670
::: code-group
671
671
```bash [Example]
@@ -709,7 +709,7 @@ function test_failure() {
709
709
710
710
Reports an error if `directory` is not an empty directory.
711
711
712
-
[assert_is_directory_not_empty](#assert-is-directory-not-empty) is the inverse of this assertion and takes the same arguments.
712
+
- [assert_is_directory_not_empty](#assert-is-directory-not-empty) is the inverse of this assertion and takes the same arguments.
713
713
714
714
::: code-group
715
715
```bash [Example]
@@ -733,7 +733,7 @@ function test_failure() {
733
733
734
734
Reports an error if `directory` is not a readable directory.
735
735
736
-
[assert_is_directory_not_readable](#assert-is-directory-not-readable) is the inverse of this assertion and takes the same arguments.
736
+
- [assert_is_directory_not_readable](#assert-is-directory-not-readable) is the inverse of this assertion and takes the same arguments.
737
737
738
738
::: code-group
739
739
```bash [Example]
@@ -757,7 +757,7 @@ function test_failure() {
757
757
758
758
Reports an error if `directory` is not a writable directory.
759
759
760
-
[assert_is_directory_not_writable](#assert-is-directory-not-writable) is the inverse of this assertion and takes the same arguments.
760
+
- [assert_is_directory_not_writable](#assert-is-directory-not-writable) is the inverse of this assertion and takes the same arguments.
761
761
762
762
::: code-group
763
763
```bash [Example]
@@ -781,7 +781,7 @@ function test_failure() {
781
781
782
782
Reports an error if `expected` and `actual` are not equals.
783
783
784
-
[assert_files_not_equals](#assert-files-not-equals) is the inverse of this assertion and takes the same arguments.
784
+
- [assert_files_not_equals](#assert-files-not-equals) is the inverse of this assertion and takes the same arguments.
785
785
786
786
::: code-group
787
787
```bash [Example]
@@ -821,7 +821,7 @@ function test_failure() {
821
821
822
822
Reports an error if the two variables `expected` and `actual` are the same value.
823
823
824
-
[assert_same](#assert-same) is the inverse of this assertion and takes the same arguments.
824
+
- [assert_same](#assert-same) is the inverse of this assertion and takes the same arguments.
825
825
826
826
::: code-group
827
827
```bash [Example]
@@ -840,7 +840,7 @@ function test_failure() {
840
840
841
841
Reports an error if `needle` is a substring of `haystack`.
842
842
843
-
[assert_contains](#assert-contains) is the inverse of this assertion and takes the same arguments.
843
+
- [assert_contains](#assert-contains) is the inverse of this assertion and takes the same arguments.
844
844
845
845
::: code-group
846
846
```bash [Example]
@@ -859,7 +859,7 @@ function test_failure() {
859
859
860
860
Reports an error if `haystack` does starts with `needle`.
861
861
862
-
[assert_string_starts_with](#assert-string-starts-with) is the inverse of this assertion and takes the same arguments.
862
+
- [assert_string_starts_with](#assert-string-starts-with) is the inverse of this assertion and takes the same arguments.
863
863
864
864
::: code-group
865
865
```bash [Example]
@@ -878,7 +878,7 @@ function test_failure() {
878
878
879
879
Reports an error if `haystack` does ends with `needle`.
880
880
881
-
[assert_string_ends_with](#assert-string-ends-with) is the inverse of this assertion and takes the same arguments.
881
+
- [assert_string_ends_with](#assert-string-ends-with) is the inverse of this assertion and takes the same arguments.
882
882
883
883
::: code-group
884
884
```bash [Example]
@@ -897,7 +897,7 @@ function test_failure() {
897
897
898
898
Reports an error if `actual` is empty.
899
899
900
-
[assert_empty](#assert-empty) is the inverse of this assertion and takes the same arguments.
900
+
- [assert_empty](#assert-empty) is the inverse of this assertion and takes the same arguments.
901
901
902
902
::: code-group
903
903
```bash [Example]
@@ -916,7 +916,7 @@ function test_failure() {
916
916
917
917
Reports an error if `value` matches the regular expression `pattern`.
918
918
919
-
[assert_matches](#assert-matches) is the inverse of this assertion and takes the same arguments.
919
+
- [assert_matches](#assert-matches) is the inverse of this assertion and takes the same arguments.
920
920
921
921
::: code-group
922
922
```bash [Example]
@@ -935,7 +935,7 @@ function test_failure() {
935
935
936
936
Reports an error if `needle` is an element of `haystack`.
937
937
938
-
[assert_array_contains](#assert-array-contains) is the inverse of this assertion and takes the same arguments.
938
+
- [assert_array_contains](#assert-array-contains) is the inverse of this assertion and takes the same arguments.
939
939
940
940
::: code-group
941
941
```bash [Example]
@@ -958,7 +958,7 @@ function test_failure() {
958
958
959
959
Reports an error if `file` does exists.
960
960
961
-
[assert_file_exists](#assert-file-exists) is the inverse of this assertion and takes the same arguments.
961
+
- [assert_file_exists](#assert-file-exists) is the inverse of this assertion and takes the same arguments.
962
962
963
963
::: code-group
964
964
```bash [Example]
@@ -985,7 +985,7 @@ function test_failed() {
985
985
986
986
Reports an error if `file` contains the search string.
987
987
988
-
[assert_file_contains](#assert-file-contains) is the inverse of this assertion and takes the same arguments.
988
+
- [assert_file_contains](#assert-file-contains) is the inverse of this assertion and takes the same arguments.
989
989
990
990
::: code-group
991
991
```bash [Example]
@@ -1010,7 +1010,7 @@ function test_failure() {
1010
1010
1011
1011
Reports an error if `directory` exists.
1012
1012
1013
-
[assert_directory_exists](#assert-directory-exists) is the inverse of this assertion and takes the same arguments.
1013
+
- [assert_directory_exists](#assert-directory-exists) is the inverse of this assertion and takes the same arguments.
1014
1014
1015
1015
::: code-group
1016
1016
```bash [Example]
@@ -1033,7 +1033,7 @@ function test_failure() {
1033
1033
1034
1034
Reports an error if `directory` is empty.
1035
1035
1036
-
[assert_is_directory_empty](#assert-is-directory-empty) is the inverse of this assertion and takes the same arguments.
1036
+
- [assert_is_directory_empty](#assert-is-directory-empty) is the inverse of this assertion and takes the same arguments.
1037
1037
1038
1038
::: code-group
1039
1039
```bash [Example]
@@ -1057,7 +1057,7 @@ function test_failure() {
1057
1057
1058
1058
Reports an error if `directory` is readable.
1059
1059
1060
-
[assert_is_directory_readable](#assert-is-directory-readable) is the inverse of this assertion and takes the same arguments.
1060
+
- [assert_is_directory_readable](#assert-is-directory-readable) is the inverse of this assertion and takes the same arguments.
1061
1061
1062
1062
::: code-group
1063
1063
```bash [Example]
@@ -1081,7 +1081,7 @@ function test_failure() {
1081
1081
1082
1082
Reports an error if `directory` is writable.
1083
1083
1084
-
[assert_is_directory_writable](#assert-is-directory-writable) is the inverse of this assertion and takes the same arguments.
1084
+
- [assert_is_directory_writable](#assert-is-directory-writable) is the inverse of this assertion and takes the same arguments.
1085
1085
1086
1086
::: code-group
1087
1087
```bash [Example]
@@ -1106,7 +1106,7 @@ function test_failure() {
1106
1106
1107
1107
Reports an error if `expected` and `actual` are not equals.
1108
1108
1109
-
[assert_files_equals](#assert-files-equals) is the inverse of this assertion and takes the same arguments.
1109
+
- [assert_files_equals](#assert-files-equals) is the inverse of this assertion and takes the same arguments.
0 commit comments