[orca-devel] quoting problem when creating a test



Hi Joanie, All,

Have been trying to write my first test, but I am having some issues with 
new line characters i think.

Whatever I do, the second test in the attached file seems to fail.

The test is not complete, but I wanted it to pass before moving on to a 
real test.


I run it as follows:
./runone.sh  ../keystrokes/gedit/bug_626032.py gedit 0

(a sidenote, some of the oowriter tests that i ran, fail for me because of 
the braille end of line symbol, the test expects \$l and i am getting $l, 
dont know if it is anything to do with the above).


Thank you for any enlightenment

-Jon
#!/usr/bin/python

"""Test of Orca's say all presentation in gedit."""

from macaroon.playback import *
import utils

sequence = MacroSequence()
sa = sequence.append
######################################################################
# Start gedit
#
sa(WaitForWindowActivate("Unsaved Document 1 - gedit"))
sa(PauseAction(3000))

######################################################################
# Type a couple of short lines.
#
line1 = "Don't Panic."
sa(TypeAction(line1))
sa(KeyComboAction("Return"))
sa(WaitAction("object:text-caret-moved", None, None, pyatspi.ROLE_TEXT, 5000))

line2 = "TheUltimateAnswer is 42"
sa(TypeAction(line2))
sa(KeyComboAction("Return"))
sa(WaitAction("object:text-caret-moved", None, None, pyatspi.ROLE_TEXT, 5000))

line3 = "bye."
sa(TypeAction(line3))
sa(KeyComboAction("Return"))
sa(WaitAction("object:text-caret-moved", None, None, pyatspi.ROLE_TEXT, 5000))

######################################################################
# Control Home to return to the top of the document.
#
sa(utils.StartRecordingAction())
sa(KeyComboAction("<Control>Home"))
sa(WaitAction("object:text-caret-moved", None, None, pyatspi.ROLE_TEXT, 5000))
sa(utils.AssertPresentationAction(
    "Top of document",
    ["BRAILLE LINE:  'gedit Application *Unsaved Document 1 - gedit Frame TabList *Unsaved Document 1 Page ScrollPane " + line1 + " $l'",
     "     VISIBLE:  '" + line1 + " $l', cursor=1",
     "SPEECH OUTPUT: '" +line1 + "'"]))

######################################################################
# Perform an orca say all
#
sa(utils.StartRecordingAction())
sa(KeyPressAction(0, None, "KP_Add"))
sa(KeyReleaseAction(0, None, "KP_Add"))
sa(utils.AssertPresentationAction(
    "Say all document",
    ["SPEECH OUTPUT: '" +line1 + "'",
     "SPEECH OUTPUT: '\n" + line2 + "\n" + line3 + "'", 
     "SPEECH OUTPUT: '\n'"]))


# Just a little extra wait to let some events get through.
#
sa(PauseAction(3000))
sa(utils.AssertionSummaryAction())
sequence.start()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]