frysk.sys.termios
Class TestLib

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by frysk.junit.TestCase
              extended by frysk.sys.termios.TestLib
All Implemented Interfaces:
Test
Direct Known Subclasses:
TestMode, TestSpecial, TestSpeed, TestTermios

public class TestLib
extends TestCase

Manipulates a terminal bound to FileDescriptor.


Field Summary
private  FileDescriptor fd
           
private static Log fine
           
protected  ProcessIdentifier pid
           
protected  PseudoTerminal pty
           
protected  Termios termios
           
 
Constructor Summary
TestLib()
           
 
Method Summary
protected  void getPseudoTerminal(Termios termios)
          Update the Termios from the pty's child.
protected  void setPseudoTerminal(Termios termios)
          Update the pty's child with termios.
 void setUp()
          Sets up the fixture, for example, open a network connection.
 void tearDown()
          Tears down the fixture, for example, close a network connection.
protected  void verifySttyOutputContains(String expected)
          Run stty on the test PTY, verify that the output contains the EXPECT string.
 
Methods inherited from class frysk.junit.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, getTimeoutMilliseconds, getTimeoutSeconds, missing32or64, unresolved, unresolvedOffUtrace, unresolvedOn32On64, unresolvedOnIA32, unresolvedOnPPC, unresolvedOnUtrace, unresolvedOnx8664, unsupported
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fine

private static final Log fine

pty

protected PseudoTerminal pty

fd

private FileDescriptor fd

termios

protected Termios termios

pid

protected ProcessIdentifier pid
Constructor Detail

TestLib

public TestLib()
Method Detail

setUp

public void setUp()
Description copied from class: TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Overrides:
setUp in class TestCase

tearDown

public void tearDown()
Description copied from class: TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Overrides:
tearDown in class TestCase

setPseudoTerminal

protected void setPseudoTerminal(Termios termios)
Update the pty's child with termios.


getPseudoTerminal

protected void getPseudoTerminal(Termios termios)
Update the Termios from the pty's child.


verifySttyOutputContains

protected void verifySttyOutputContains(String expected)
Run stty on the test PTY, verify that the output contains the EXPECT string.