Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
some new files used to check Tesh
[simgrid.git] / tools / tesh2 / examples / background.tesh
index 988eba8..a416496 100644 (file)
@@ -1,50 +1,50 @@
-\r
-$ rm -rf temp_testdir\r
-$ mkdir temp_testdir\r
-$ cd temp_testdir\r
-\r
-< #include <unistd.h>\r
-< #include <stdlib.h>\r
-< #include <stdio.h>\r
-< #include <sys/types.h>\r
-< #include <sys/stat.h>\r
-< #include <fcntl.h>\r
-<                   \r
-< int main() {\r
-<   char buff[2048];\r
-<   int got;\r
-<   int in;\r
-< \r
-<   sleep(1);\r
-<   in = open("tmp_fich",O_RDONLY|O_CREAT);\r
-<   if (in == -1) {\r
-<     perror("Cannot open tmp_fich: ");\r
-<     exit(1);\r
-<   }\r
-<   while ((got = read(in,&buff,2048))>0) {\r
-<      int w = write(1,&buff,got);\r
-<      if (w<0) {\r
-<        perror("Error while writing:");\r
-<        exit(1);\r
-<      }\r
-<   }\r
-<   if (got < 0) {\r
-<     perror("Error while reading:");\r
-<     exit(1);\r
-<   }\r
-<   return 0;\r
-< }\r
-$ cat > delayed_cat.c\r
-\r
-$ gcc -Wall -o delayed_cat delayed_cat.c\r
-\r
-& ./delayed_cat \r
-> TOTO\r
-\r
-< TOTO\r
-$ cat > tmp_fich\r
-\r
-$ sleep 2\r
-$ cd ..\r
-$ rm -rf temp_testdir\r
-\r
+
+$ rm -rf temp_testdir
+$ mkdir temp_testdir
+$ cd temp_testdir
+
+< #include <unistd.h>
+< #include <stdlib.h>
+< #include <stdio.h>
+< #include <sys/types.h>
+< #include <sys/stat.h>
+< #include <fcntl.h>
+<                   
+< int main() {
+<   char buff[2048];
+<   int got;
+<   int in;
+< 
+<   sleep(1);
+<   in = open("tmp_fich",O_RDONLY|O_CREAT);
+<   if (in == -1) {
+<     perror("Cannot open tmp_fich: ");
+<     exit(1);
+<   }
+<   while ((got = read(in,&buff,2048))>0) {
+<      int w = write(1,&buff,got);
+<      if (w<0) {
+<        perror("Error while writing:");
+<        exit(1);
+<      }
+<   }
+<   if (got < 0) {
+<     perror("Error while reading:");
+<     exit(1);
+<   }
+<   return 0;
+< }
+$ cat > delayed_cat.c
+
+$ gcc -Wall -o delayed_cat delayed_cat.c
+
+& ./delayed_cat 
+> TOTO
+
+< TOTO
+$ cat > tmp_fich
+
+$ sleep 2
+$ cd ..
+$ rm -rf temp_testdir
+