Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tesh: only make an absolute path out of test file if not already one
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 26 Jul 2016 09:47:31 +0000 (11:47 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 26 Jul 2016 09:47:31 +0000 (11:47 +0200)
tools/tesh/tesh.pl

index 34f17ff..fe1d60d 100755 (executable)
@@ -326,9 +326,13 @@ if ($diff_tool) {
 }
 
 if ( $tesh_file =~ m/(.*)\.tesh/ ) {
 }
 
 if ( $tesh_file =~ m/(.*)\.tesh/ ) {
-    my $dir = qx,pwd,;
-    chomp($dir);
-    print "Test suite '$dir/$tesh_file'\n";
+    my $fullname = $tesh_file;
+    if (not ($fullname =~ m|^/|)) { # not absolute path
+       my $dir = qx,pwd,;
+       chomp($dir);
+       $fullname = "$dir/$fullname"
+    }
+    print "Test suite '$tesh_file'\n";
 } else {
     $tesh_name = "(stdin)";
     print "Test suite from stdin\n";
 } else {
     $tesh_name = "(stdin)";
     print "Test suite from stdin\n";