Skip to content

Commit

Permalink
amarok: fix syntax for ternary operation
Browse files Browse the repository at this point in the history
send_key tag_has_match('foo') ? 'variant1' : 'variant2';
results in the condition 'sendkey tag_has_match' - and its true/false result
would trigger 'variant1' or 'variant2' as 'command'. In perl though, a 'string' on
it's own is simply a true statement:

Wrap the ternary operatoin properly in parentheses to ensure the result of that
operation is passed down to send_key.
  • Loading branch information
DimStar77 committed Jan 16, 2025
1 parent 2568d56 commit 93ee497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/x11/amarok.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sub run {
# and don't put this after opening oga file, per video
# the window pop-up meanwhile x11_start_progran typeing,
# and 40 sec to wait that window pop-up should enough
send_key match_has_tag 'test-amarok-new-1' ? 'alt-u' : 'alt-y';
send_key (match_has_tag 'test-amarok-new-1' ? 'alt-u' : 'alt-y');
assert_screen([qw(librivox-authentication test-amarok-2)]);
if (match_has_tag('librivox-authentication')) {
send_key "alt-c"; # cancel librivox certificate
Expand Down

0 comments on commit 93ee497

Please sign in to comment.