diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-01-22 22:03:00 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-01-22 22:03:00 (GMT) |
commit | a1ad371e696289b022484c87c9d191180b132d18 (patch) | |
tree | 45c230bcd32675468d62b7bba5cd49cf4e7cdeb8 /test/src/test-expect.cpp | |
parent | 4206a3f8629da7005a6154912ccd690a38541930 (diff) | |
download | uscxml-a1ad371e696289b022484c87c9d191180b132d18.zip uscxml-a1ad371e696289b022484c87c9d191180b132d18.tar.gz uscxml-a1ad371e696289b022484c87c9d191180b132d18.tar.bz2 |
Ported IM Invoker for pre 3.0 and beautified code
Diffstat (limited to 'test/src/test-expect.cpp')
-rw-r--r-- | test/src/test-expect.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/test/src/test-expect.cpp b/test/src/test-expect.cpp index 51c3bcb..8b1303e 100644 --- a/test/src/test-expect.cpp +++ b/test/src/test-expect.cpp @@ -10,19 +10,19 @@ int main(int argc, char** argv) { Tcl_FindExecutable(argv[0]); if (Tcl_Init(interp) == TCL_ERROR) { - fprintf(stderr,"Tcl_Init failed: %s\n",Tcl_GetStringResult (interp)); - (void) exit(1); + fprintf(stderr,"Tcl_Init failed: %s\n",Tcl_GetStringResult (interp)); + (void) exit(1); } if (Expect_Init(interp) == TCL_ERROR) { - fprintf(stderr,"Expect_Init failed: %s\n",Tcl_GetStringResult (interp)); - (void) exit(1); + fprintf(stderr,"Expect_Init failed: %s\n",Tcl_GetStringResult (interp)); + (void) exit(1); } - + exp_loguser = 1; exp_is_debugging = 1; exp_timeout = 3; - + FILE *fp; int ec; // char* program = "/usr/bin/telnet localhost 80"; @@ -39,20 +39,20 @@ int main(int argc, char** argv) { setbuf(fp,(char *)0); switch (exp_fexpectl(fp, - exp_glob, "qConnected to", 1, - exp_glob, "qConnection failed", 2, - exp_end)) { - case 1: - printf("SUCCESS!"); - fprintf(fp, "%s\r", "GET /"); - - break; - case 2: - printf("FAIL!"); - break; - - default: - break; + exp_glob, "qConnected to", 1, + exp_glob, "qConnection failed", 2, + exp_end)) { + case 1: + printf("SUCCESS!"); + fprintf(fp, "%s\r", "GET /"); + + break; + case 2: + printf("FAIL!"); + break; + + default: + break; } - exit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); }
\ No newline at end of file |