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="log.thresh:info tesh.fmt:%m%n"\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
-< $ Cat\r
+< $ cat\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
-< $ Cat\r
+< $ cat\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
-< $ Cat\r
+< $ cat\r
< > TOTO\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, in, out\r
-< $ Cat\r
+< $ cat\r
< < TOTO\r
< > TOTO\r
-$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
+$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\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
- $ Cat\r
+ $ cat\r
< TOTO\r
> TOTO\r
\r
> TOTO\r
- $ Cat\r
+ $ cat\r
< TOTO\r
\r
Nevertheless, it is possible to have several commands in the same block, but\r
\r
$ cd toto\r
> TOTO\r
- $ Cat > file\r
+ $ cat > file\r
\r
TOTO will be passed to the cd command, where the user clearly want to pass it\r
-to Cat.\r
+to cat.\r
\r
RETURN CODE\r
-----------\r
< }\r
< return 0;\r
< }\r
-$ Cat > delayed_cat.c\r
+$ cat > delayed_cat.c\r
\r
$ gcc -Wall -o delayed_cat delayed_cat.c\r
\r
> TOTO\r
\r
< TOTO\r
-$ Cat > tmp_fich\r
+$ cat > tmp_fich\r
\r
$ sleep 2\r
$ cd ..\r
\r
< TOTO \\r
TUTU\r
-$ Cat > tmp_fich\r
+$ cat > tmp_fich\r
\r
-$ Cat tmp_fich\r
+$ cat tmp_fich\r
> TOTO TUTU\r
\r
$ rm tmp_fich\r
< b\r
< c\r
< d\r
-$ Cat > tmp_fich\r
+$ cat > tmp_fich\r
\r
-$ Cat tmp_fich\r
+$ cat tmp_fich\r
> a\r
> b\r
> c\r
\r
< TOTO \\r
TUTU\r
-& Cat\r
+& cat\r
> TOTO TUTU\r
\r
p And now, some multilines examples\r
< b\r
< c\r
< d\r
-& Cat\r
+& cat\r
> a\r
> b\r
> c\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
-$ Cat > segfault.c\r
+$ cat > segfault.c\r
\r
$ gcc -o segfault segfault.c\r
! expect signal SIGSEGV\r
< int main(void) {\r
< exit(1);\r
< }\r
-$ Cat > return1.c\r
+$ cat > return1.c\r
\r
$ gcc -o return1 return1.c\r
\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
-$ Cat > segfault.c\r
+$ cat > segfault.c\r
\r
$ gcc -o segfault segfault.c\r
\r
< $ ./segfault\r
$ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
\r
+\r
$ cd ..\r
$ rm -rf temp_testdir\r
\r
p This tests whether TESH detects wrong outputs\r
\r
-! expect return $EOUTPUTNOTMATCH\r
+! expect return 2\r
< > TOTO\r
< < TUTU\r
< $ cat\r
$ ./tesh --log="log.thresh:info tesh.fmt:%m%n"\r
-\r
-\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
\r
# Check that tesh detects properly cd to non-existing directories\r
! expect return $ENOENT\r
< $ cd toto\r
+\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
-< $ 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
< int main(void) {\r
< exit(1);\r
< }\r
-$ Cat > return1.c\r
+$ cat > return1.c\r
\r
$ gcc -o return1 return1.c\r
\r
< char *A=NULL;\r
< *A = 1;\r
< }\r
-$ Cat > segfault.c\r
+$ cat > segfault.c\r
\r
$ gcc -o segfault segfault.c\r
! expect signal SIGSEGV\r