Comment #4 on issue 1697 by a3axa...@gmail.com: Telnet.Write skips output results
http://code.google.com/p/robotframework/issues/detail?id=1697

Hello.

There is a simple java telnet echo server.

class TelnetServer {
  public static void main(String args[]) {
    String data = "supported commands:\n" +
      "\n" +
      "\r  quit - close connection\n" +
      "\r  help - print help information\n" +
      "\n" +
      "\r\n" +
      "PROMPT: ";
    try {
      ServerSocket s = new ServerSocket(8088);
      while (true) {
        Socket incoming = s.accept();
        BufferedReader in
          = new BufferedReader(
          new InputStreamReader(
            incoming.getInputStream()));
        PrintWriter out
          = new PrintWriter(
          new OutputStreamWriter(
            incoming.getOutputStream()));
        while (true) {
          String str = in.readLine();
          out.println("Echo: " + data);
          out.flush();
          break;
        }
        incoming.close();
      }
    } catch (Exception e) {}
  }
}


This test will fail -
TestTelnetExecute
    [Setup]    None
Telnet.Open Connection 127.0.0.1 Telnet1 8088 10s prompt=PROMPT:
    ${output}    Telnet.Execute command    help
    Should Contain    ${output}    supported commands
    [Teardown]    None

And this is ok -
TestTelnetExecute
    [Setup]    None
Telnet.Open Connection 127.0.0.1 Telnet1 8088 10s prompt=PROMPT:
    Telnet.Write bare    help\n
    ${output}=    Telnet.Read until prompt
    Should Contain    ${output}    supported commands
    [Teardown]    None



--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to