Test 175: use BAIL_OUT instead of `die`
Patch status: merged
Patch by Tony Crisci
Long description:
BAIL_OUT produces a friendlier message explaining why the tests cannot continue on the command line. `die` produces a cryptic message that some test failed for some reason.
To apply this patch, use:
curl http://cr.i3wm.org/patch/480/raw.patch | git am
b/testcases/t/175-startup-notification.t
| 16 |
@@ -84,7 +84,7 @@ is_num_children($first_ws, 0, 'no containers on this workspace yet'); |
| 17 |
# echo its $DESKTOP_STARTUP_ID. We (blockingly) read the variable into |
| 18 |
# $startup_id in the testcase. |
| 19 |
my $tmp = tmpnam(); |
| 20 |
-mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; |
| 21 |
+mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp"; |
| 22 |
|
| 23 |
cmd qq|exec echo \$DESKTOP_STARTUP_ID >$tmp|; |
| 24 |
|
| 25 |
@@ -182,7 +182,7 @@ is_num_children($third_ws, 2, 'two containers on the third workspace'); |
| 26 |
# environment variable. |
| 27 |
###################################################################### |
| 28 |
|
| 29 |
-mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; |
| 30 |
+mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp"; |
| 31 |
|
| 32 |
cmd qq|exec --no-startup-id echo \$DESKTOP_STARTUP_ID >$tmp|; |
| 33 |
|
| 34 |
@@ -198,7 +198,7 @@ is($startup_id, '', 'startup_id empty'); |
| 35 |
# 4) same thing, but with double quotes in exec |
| 36 |
###################################################################### |
| 37 |
|
| 38 |
-mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; |
| 39 |
+mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp"; |
| 40 |
|
| 41 |
cmd qq|exec --no-startup-id "echo \$DESKTOP_STARTUP_ID >$tmp"|; |
| 42 |
|