From 91d589b17637fbd38f9b57a7fb075dcf881c5995 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 25 Oct 2011 22:21:37 +0100 Subject: [PATCH] tests: extend t/175-startup-notification to test the --no-startup-id flag --- testcases/t/175-startup-notification.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/testcases/t/175-startup-notification.t b/testcases/t/175-startup-notification.t index 58b3e0cd..635ee476 100644 --- a/testcases/t/175-startup-notification.t +++ b/testcases/t/175-startup-notification.t @@ -84,6 +84,8 @@ close($fh); unlink($tmp); +isnt($startup_id, '', 'startup_id not empty'); + $ENV{DESKTOP_STARTUP_ID} = $startup_id; # Create a new libstartup-notification launchee context @@ -132,4 +134,21 @@ sync_with_i3($x); my $otherwin = open_window($x); is(@{get_ws_content($second_ws)}, 1, 'one container on the second workspace'); +###################################################################### +# 3) test that the --no-startup-id flag for exec leads to no DESKTOP_STARTUP_ID +# environment variable. +###################################################################### + +mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; + +cmd qq|exec --no-startup-id echo \$DESKTOP_STARTUP_ID >$tmp|; + +open($fh, '<', $tmp); +chomp($startup_id = <$fh>); +close($fh); + +unlink($tmp); + +is($startup_id, '', 'startup_id empty'); + done_testing; -- 2.39.5