Skip to content

Commit 0fcac3f

Browse files
jordansisselbuldi
authored andcommitted
Add test case for a long script command.
Where "long" means longer than the script buffer size which, at this time, is 4096 bytes. Verified this test case fails prior to jordansissel#364 being merged and succeeds after.
1 parent 722b5b6 commit 0fcac3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/test_script.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ def test_simple
2727
xdotool_script_ok [ "# comment", "mousemove 0 0" ]
2828
xdotool_script_ok [ "mousemove 0 0", "mousemove 0 0" ]
2929
xdotool_script_ok [ "mousemove 0 0", "", "mousemove 0 0" ]
30+
3031
end # def test_expected_failures
32+
33+
def test_long
34+
# Create a really long chained command that is longer than a single 4096byte read
35+
# xdotool's script_main reads the input 4096 bytes at a time.
36+
xdotool_script_ok [ "mousemove 0 0 " * 1000 ]
37+
end
3138
end # class XdotoolCommandWindowFocusTests
3239

0 commit comments

Comments
 (0)