X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f2df13795e01302813a6aef10825ec7e922ce530..refs/heads/master:/tools/tesh/setenv.tesh diff --git a/tools/tesh/setenv.tesh b/tools/tesh/setenv.tesh index 632fd8bb44..81319826e7 100644 --- a/tools/tesh/setenv.tesh +++ b/tools/tesh/setenv.tesh @@ -1,31 +1,21 @@ -#! ./tesh +#!/usr/bin/env tesh # This suite builds and uses a program returning 1. # tesh is instructed of this return code and must not whine. -$ rm -rf temp_testdir-setenv -$ mkdir temp_testdir-setenv +! output ignore +$ cmake -E remove_directory temp_testdir_setenv -$ cd temp_testdir-setenv +$ mkdir temp_testdir_setenv +$ cd temp_testdir_setenv -< #include -< #include -< extern char **environ; -< int main(void) { -< char **env_iter=environ; -< while (*env_iter) { -< if (!strncmp(*env_iter,"tesh_test_toto=",strlen("tesh_test_toto="))) -< printf("%s\n",*env_iter); -< env_iter++; -< } -< return 0; -< } -$ mkfile getenv.c - -$ cc -o getenv getenv.c -g +< print "tesh_test_toto=$ENV{tesh_test_toto}"; +$ mkfile testenv.pl ! setenv tesh_test_toto=blah -$ ./getenv +$ perl testenv.pl > tesh_test_toto=blah $ cd .. -$ rm -rf temp_testdir-setenv + +! output ignore +$ cmake -E remove_directory temp_testdir_setenv