[test suite] additional critical var popen() tests
authorMichael Rash <mbr@cipherdyne.org>
Mon, 31 Mar 2014 01:10:17 +0000 (21:10 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Mon, 31 Mar 2014 17:54:10 +0000 (13:54 -0400)
test/tests/basic_operations.pl

index 4f41485..b583b77 100644 (file)
     {
         'category' => 'basic operations',
         'subcategory' => 'client save rc file',
-        'detail'   => 'digest SHA1 no force save',
+        'detail'   => 'digest SHA1 ask y/n (1)',
         'function' => \&client_rc_file,
         'cmdline'  => "$client_save_rc_args_no_force --key-gen -n default " .
             "--digest-type SHA1 --use-hmac",
         'positive_output_matches' => [qr/Updating\sparam.*SHA1/],
         'rc_positive_output_matches' => [qr/DIGEST_TYPE.*SHA1/],
     },
+    {
+        'category' => 'basic operations',
+        'subcategory' => 'client save rc file',
+        'detail'   => 'digest SHA1 ask y/n (2)',
+        'function' => \&client_rc_file,
+        'cmdline'  => "$client_save_rc_args_no_force --key-gen -n default " .
+            "--digest-type SHA1 --use-hmac",
+        'save_rc_stanza' => [{'name' => 'default',
+                'vars' => {'HMAC_KEY' => 'testtest', 'DIGEST_TYPE' => 'MD5'}}],
+        'client_popen' => 'y',  ### interact with ask overwrite feature
+        'positive_output_matches' => [qr/Updating\sparam.*SHA1/],
+        'rc_positive_output_matches' => [qr/DIGEST_TYPE.*SHA1/],
+    },
+    {
+        'category' => 'basic operations',
+        'subcategory' => 'client save rc file',
+        'detail'   => 'digest SHA1 ask y/n (3)',
+        'function' => \&client_rc_file,
+        'cmdline'  => "$client_save_rc_args_no_force --key-gen -n default " .
+            "--digest-type SHA1 --use-hmac",
+        'save_rc_stanza' => [{'name' => 'default',
+                'vars' => {'KEY_BASE64' => 'testtest', 'DIGEST_TYPE' => 'MD5'}}],
+        'client_popen' => 'y',  ### interact with ask overwrite feature
+        'positive_output_matches' => [qr/Updating\sparam.*SHA1/],
+        'rc_positive_output_matches' => [qr/DIGEST_TYPE.*SHA1/],
+    },
+    {
+        'category' => 'basic operations',
+        'subcategory' => 'client save rc file',
+        'detail'   => 'digest SHA1 ask y/n (4)',
+        'function' => \&client_rc_file,
+        'cmdline'  => "$client_save_rc_args_no_force --key-gen -n default " .
+            "--digest-type SHA1 --use-hmac",
+        'save_rc_stanza' => [{'name' => 'default',
+                'vars' => {'HMAC_KEY_BASE64' => 'testtest', 'DIGEST_TYPE' => 'MD5'}}],
+        'client_popen' => 'y',  ### interact with ask overwrite feature
+        'positive_output_matches' => [qr/Updating\sparam.*SHA1/],
+        'rc_positive_output_matches' => [qr/DIGEST_TYPE.*SHA1/],
+    },
 
     {
         'category' => 'basic operations',