#!/usr/bin/python from macaroon.playback import * import utils utils.setClipboardText("Hello world") sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(KeyComboAction("Return")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Control><Shift>v")) sequence.append( utils.AssertPresentationAction("1. Paste", [ "BRAILLE LINE: '$ Hello world'", " VISIBLE: '$ Hello world', cursor=14", "BRAILLE LINE: 'Pasted contents from clipboard.'", " VISIBLE: 'Pasted contents from clipboard.', cursor=0", "BRAILLE LINE: '$ Hello world'", " VISIBLE: '$ Hello world', cursor=14", "SPEECH OUTPUT: 'Pasted contents from clipboard.' voice=system" ])) sequence.append(utils.AssertionSummaryAction()) sequence.start()
#!/usr/bin/python from macaroon.playback import * import utils utils.setClipboardText("Hello world") sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(KeyComboAction("Return")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Control><Shift>v")) sequence.append(utils.AssertPresentationAction( "1. Paste", ["BRAILLE LINE: '$ Hello world'", " VISIBLE: '$ Hello world', cursor=14", "BRAILLE LINE: 'Pasted contents from clipboard.'", " VISIBLE: 'Pasted contents from clipboard.', cursor=0", "BRAILLE LINE: '$ Hello world'", " VISIBLE: '$ Hello world', cursor=14", "SPEECH OUTPUT: 'Pasted contents from clipboard.' voice=system"])) sequence.append(utils.AssertionSummaryAction()) sequence.start()
#!/usr/bin/python from macaroon.playback import * import utils utils.setClipboardText('for i in {0..50}; do echo "Count: $i"; sleep 2; done') sequence = MacroSequence() sequence.append(KeyComboAction("<Control><Shift>v")) sequence.append(KeyComboAction("Return")) sequence.append(KeyComboAction("<Control><Shift>t")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(PauseAction(2000)) sequence.append( utils.AssertPresentationAction("1. Return", [ "BRAILLE LINE: '$ '", " VISIBLE: '$ ', cursor=3", "SPEECH OUTPUT: '$ '" ])) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(PauseAction(2000)) sequence.append( utils.AssertPresentationAction("2. Return", [ "BRAILLE LINE: '$ '", " VISIBLE: '$ ', cursor=3", "SPEECH OUTPUT: '$ '" ]))
#!/usr/bin/python from macaroon.playback import * import utils utils.setClipboardText('for i in {0..50}; do echo "Count: $i"; sleep 2; done') sequence = MacroSequence() sequence.append(KeyComboAction("<Control><Shift>v")) sequence.append(KeyComboAction("Return")) sequence.append(KeyComboAction("<Control><Shift>t")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(PauseAction(2000)) sequence.append(utils.AssertPresentationAction( "1. Return", ["BRAILLE LINE: '$ '", " VISIBLE: '$ ', cursor=3", "SPEECH OUTPUT: '$ '"])) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(PauseAction(2000)) sequence.append(utils.AssertPresentationAction( "2. Return", ["BRAILLE LINE: '$ '", " VISIBLE: '$ ', cursor=3", "SPEECH OUTPUT: '$ '"]))
#!/usr/bin/python from macaroon.playback import * import utils utils.setClipboardText('PS1="prompt> "') sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(utils.AssertPresentationAction( "1. Return in old shell", ["BRAILLE LINE: '$ '", " VISIBLE: '$ ', cursor=3", "SPEECH OUTPUT: '$ '"])) sequence.append(TypeAction("bash")) sequence.append(KeyComboAction("Return")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Control><Shift>v")) sequence.append(KeyComboAction("Return")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append(utils.AssertPresentationAction( "2. Return in new shell with changed prompt", ["BRAILLE LINE: 'prompt> '",
#!/usr/bin/python from macaroon.playback import * import utils utils.setClipboardText('PS1="prompt> "') sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append( utils.AssertPresentationAction( "1. Return in old shell", ["BRAILLE LINE: '$ '", " VISIBLE: '$ ', cursor=3", "SPEECH OUTPUT: '$ '"] ) ) sequence.append(TypeAction("bash")) sequence.append(KeyComboAction("Return")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("<Control><Shift>v")) sequence.append(KeyComboAction("Return")) sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("Return")) sequence.append( utils.AssertPresentationAction( "2. Return in new shell with changed prompt",