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t:%m%n"\r
\r
p Order: out, in, cmd\r
< > TOTO\r
< < TOTO\r
\r
p Order: out, in, cmd\r
< > TOTO\r
< < TOTO\r
-< $ Cat\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+< $ cat\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
p Order: out, cmd, in\r
< > TOTO\r
\r
p Order: out, cmd, in\r
< > TOTO\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
p Order: in, cmd, out\r
< < TOTO\r
\r
p Order: in, cmd, out\r
< < TOTO\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
p Order: cmd, out, in\r
\r
p Order: cmd, out, in\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
p Order: cmd, in, out\r
\r
p Order: cmd, in, out\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
the command or before. The difference between the two following chunks is\r
mainly cosmetic in your testsuites, TESH don't care. (cf IO-orders.tesh)\r
\r
the command or before. The difference between the two following chunks is\r
mainly cosmetic in your testsuites, TESH don't care. (cf IO-orders.tesh)\r
\r
< TOTO\r
> TOTO\r
\r
> TOTO\r
< TOTO\r
> TOTO\r
\r
> TOTO\r
< TOTO\r
\r
Nevertheless, it is possible to have several commands in the same block, but\r
< TOTO\r
\r
Nevertheless, it is possible to have several commands in the same block, but\r
\r
TOTO will be passed to the cd command, where the user clearly want to pass it\r
\r
TOTO will be passed to the cd command, where the user clearly want to pass it\r
\r
RETURN CODE\r
-----------\r
\r
RETURN CODE\r
-----------\r
< }\r
< return 0;\r
< }\r
< }\r
< return 0;\r
< }\r
\r
$ gcc -Wall -o delayed_cat delayed_cat.c\r
\r
\r
$ gcc -Wall -o delayed_cat delayed_cat.c\r
\r
> TOTO TUTU\r
\r
$ rm tmp_fich\r
> TOTO TUTU\r
\r
$ rm tmp_fich\r
> TOTO TUTU\r
\r
p And now, some multilines examples\r
> TOTO TUTU\r
\r
p And now, some multilines examples\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
\r
$ gcc -o segfault segfault.c\r
! expect signal SIGSEGV\r
\r
$ gcc -o segfault segfault.c\r
! expect signal SIGSEGV\r
< int main(void) {\r
< exit(1);\r
< }\r
< int main(void) {\r
< exit(1);\r
< }\r
\r
$ gcc -o return1 return1.c\r
\r
\r
$ gcc -o return1 return1.c\r
\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
\r
$ gcc -o segfault segfault.c\r
\r
\r
$ gcc -o segfault segfault.c\r
\r
< $ ./segfault\r
$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
< $ ./segfault\r
$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
$ cd ..\r
$ rm -rf temp_testdir\r
$ cd ..\r
$ rm -rf temp_testdir\r
\r
p This tests whether TESH detects wrong outputs\r
\r
\r
p This tests whether TESH detects wrong outputs\r
\r
-! expect return $EOUTPUTNOTMATCH\r
< > TOTO\r
< < TUTU\r
< $ cat\r
$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
< > TOTO\r
< < TUTU\r
< $ cat\r
$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+> Test suite from stdin\r
+> [stdin:3] cat\r
+> Output of <stdin:3> mismatch:\r
+> - TOTO\r
+> + TUTU\r
+> Test suite `(stdin)': NOK (<stdin:3> output mismatch)\r
# Check that tesh detects properly cd to non-existing directories\r
! expect return $ENOENT\r
< $ cd toto\r
# Check that tesh detects properly cd to non-existing directories\r
! expect return $ENOENT\r
< $ cd toto\r
$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
# The next command checks that there is a testdir_temp in the upper directory, \r
$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
# The next command checks that there is a testdir_temp in the upper directory, \r
< ! output ignore\r
< > TOTO\r
< < TUTU\r
< ! output ignore\r
< > TOTO\r
< < TUTU\r
-< $ Cat\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+< $ cat\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
< int main(void) {\r
< exit(1);\r
< }\r
< int main(void) {\r
< exit(1);\r
< }\r
\r
$ gcc -o return1 return1.c\r
\r
\r
$ gcc -o return1 return1.c\r
\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
\r
$ gcc -o segfault segfault.c\r
! expect signal SIGSEGV\r
\r
$ gcc -o segfault segfault.c\r
! expect signal SIGSEGV\r