Add "no-op" command for testing uses
authorJacob Bachmeyer <jcb@gnu.org>
Thu, 25 Mar 2021 01:44:22 +0000 (20:44 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Thu, 25 Mar 2021 01:44:22 +0000 (20:44 -0500)
This command is only recognized in test mode.

upload-ftp-v1.2.pl

index c27012c979c555b75a6ddcd1e83714daa38c8446..65cdb7d1a6d3972fba399c5d67fb3d93c88b8b3f 100755 (executable)
@@ -858,6 +858,9 @@ sub read_directive_file {
       $info{"replace"} = $1; #ok.
     } elsif ($tainted_cmd =~ /^comment:?$/i) {  # case-insensitive, w or w/o the :
       # Comments are ok, we ignore them
+    } elsif (IN_TEST_MODE && $tainted_cmd =~ /^no-op:?$/i) {
+      # The testsuite uses a no-op command to validate directive processing.
+      $info{'no-op'} = {order => $cnt++};
     } else {
       &fatal("Invalid directive line:\n\n  $tainted_cmd $tainted_val",1,$directive_file_contents);
     }