DuffPane now has the start of a unit test suite. Invoke it via 'ant

clean check'.  Right now there are tests to ensure that typing certain
sequences of keys in the Extended Wylie keyboard gives the expected
Extended Wylie back when "Tools/Convert Tibetan to Wylie" is invoked.

The syntactically illegal d.wa now converts to Tibetan and then back
to d.wa (not dwa, as it did); likewise with the illegal g.wa.  wa
doesn't take any prefixes, but I prefer clean end-to-end
behavior. (jeskd doesn't go end-to-end, though.)

Note that you cannot successfully run the DuffPane tests on a Linux
box unless your DISPLAY variable is set correctly.  Thus, my nightly
builds will fail with an Error (as opposed to a Failure).
This commit is contained in:
dchandler 2003-04-14 05:22:27 +00:00
parent d9b22a43d6
commit efa8fc1f25
8 changed files with 444 additions and 109 deletions

View file

@ -493,7 +493,10 @@ public class Jskad extends JPanel implements DocumentListener {
toolBar.add(keyboards);
toolBar.add(Box.createHorizontalGlue());
JScrollPane sp = new JScrollPane(dp, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
JScrollPane sp
= new JScrollPane(dp,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
dp.getDocument().addDocumentListener(this);
if (parentObject instanceof JFrame) {
@ -867,14 +870,8 @@ public class Jskad extends JPanel implements DocumentListener {
try {
BufferedReader in = new BufferedReader(new FileReader(txt_fileChosen));
DuffPane dp2;
// FIXME: why do we need a whole DuffPane to do this? we
// definitely don't need a status bar...
if (ThdlOptions.getBooleanOption(Jskad.enableKeypressStatusProp)) {
dp2 = new DuffPane(statusBar);
} else {
dp2 = new DuffPane();
}
// FIXME: why do we need a whole DuffPane to do this?
DuffPane dp2 = new DuffPane();
try {
String val = in.readLine();
@ -886,14 +883,12 @@ public class Jskad extends JPanel implements DocumentListener {
TibetanDocument t_doc = (TibetanDocument)dp2.getDocument();
t_doc.writeRTFOutputStream(new FileOutputStream(new File(rtf_fileName)));
}
catch (IOException ioe) {
} catch (IOException ioe) {
ThdlDebug.noteIffyCode();
System.out.println("problem reading or writing file");
}
}
catch (FileNotFoundException fnfe) {
ThdlDebug.noteIffyCode();
} catch (FileNotFoundException fnfe) {
ThdlDebug.noteIffyCode();
System.out.println("problem reading file");
}
}