Skip to content

Commit

Permalink
Added new rc file processing tests for the SPA_SERVER_PORT.
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Joncourt committed Apr 30, 2013
1 parent 9017525 commit 2110790
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/config_init.c
Expand Up @@ -1165,7 +1165,7 @@ update_rc(fko_cli_options_t *options, uint32_t args_bitmask)
}

/* If the stanza has not been found, we append the settings to the file,
* othewise we already updated it earlier. */
* otherwise we already updated it earlier. */
if (stanza_updated == 0)
{
fprintf(rc_update, "\n[%s]\n", options->use_rc_stanza);
Expand Down
22 changes: 22 additions & 0 deletions test/tests/basic_operations.pl
Expand Up @@ -210,6 +210,28 @@
'positive_output_matches' => [qr/protocol:\sicmp/],
'fatal' => $NO
},
{
'category' => 'basic operations',
'subcategory' => 'client rc file',
'detail' => 'spa server port 65421',
'function' => \&client_rc_file,
'cmdline' => $client_rewrite_rc_args,
'write_rc_file' => [{'name' => 'default',
'vars' => {'KEY' => 'testtest', 'SPA_SERVER_PORT' => '65421'}}],
'positive_output_matches' => [qr/port:\s65421/],
'fatal' => $NO
},
{
'category' => 'basic operations',
'subcategory' => 'client rc file',
'detail' => 'spa server port 22',
'function' => \&client_rc_file,
'cmdline' => $client_rewrite_rc_args,
'write_rc_file' => [{'name' => 'default',
'vars' => {'KEY' => 'testtest', 'SPA_SERVER_PORT' => '22'}}],
'positive_output_matches' => [qr/port:\s22/],
'fatal' => $NO
},

### rc file saving --save-rc-stanza
{
Expand Down

0 comments on commit 2110790

Please sign in to comment.