From: Michael Stapelberg Date: Tue, 25 Oct 2011 21:21:37 +0000 (+0100) Subject: tests: extend t/175-startup-notification to test the --no-startup-id flag X-Git-Tag: 4.1~46^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=91d589b17637fbd38f9b57a7fb075dcf881c5995;p=i3%2Fi3 tests: extend t/175-startup-notification to test the --no-startup-id flag --- 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;