Commit c385bb31 authored by Morten Welinder's avatar Morten Welinder

sstest: move dumping of samples to here from main binary.

This avoids one of many hidden options for Gnumeric that are not useful
for non-developers.
parent f16c535e
......@@ -53,7 +53,6 @@ static gboolean gnumeric_no_warnings = FALSE;
static gchar *func_def_file = NULL;
static gchar *func_state_file = NULL;
static gchar *ext_refs_file = NULL;
static gchar *samples_file = NULL;
static gchar *geometry = NULL;
static gchar **startup_files;
......@@ -91,12 +90,6 @@ static const GOptionEntry gnumeric_options [] = {
N_("Dumps web page for function help"),
N_("FILE")
},
{
"samples-file", 0,
G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME, &samples_file,
N_("Dumps list of samples in function help"),
N_("FILE")
},
{
"split-func", 0,
G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &split_funcdocs,
......@@ -294,8 +287,6 @@ main (int argc, char const **argv)
return gnm_dump_func_defs (NULL, 2);
if (ext_refs_file)
return gnm_dump_func_defs (ext_refs_file, 4);
if (samples_file)
return gnm_dump_func_defs (samples_file, 5);
if (with_gui) {
go_component_set_default_command_context (cc = gnm_cmd_context_stderr_new ());
......
......@@ -36,6 +36,7 @@
static gboolean sstest_show_version = FALSE;
static gboolean sstest_fast = FALSE;
static gchar *samples_file = NULL;
static GOptionEntry const sstest_options [] = {
{
......@@ -45,6 +46,13 @@ static GOptionEntry const sstest_options [] = {
NULL
},
{
"samples-file", 0,
0, G_OPTION_ARG_FILENAME, &samples_file,
N_("Dumps list of samples in function help"),
N_("FILE")
},
{
"version", 'V',
0, G_OPTION_ARG_NONE, &sstest_show_version,
......@@ -2657,6 +2665,9 @@ main (int argc, char const **argv)
go_error_info_free (plugin_errs);
}
if (samples_file)
return gnm_dump_func_defs (samples_file, 5);
testname = argv[1];
if (!testname) testname = "all";
......
......@@ -9,7 +9,7 @@ $GnumericTest::default_subtests = '*,-biff7';
my $csvfile = "samples.csv";
&GnumericTest::junkfile ($csvfile);
{
my $cmd = "$gnumeric --samples-file=$csvfile";
my $cmd = "$sstest --samples-file=$csvfile";
print STDERR "# $cmd\n" if $GnumericTest::verbose;
system ($cmd);
if (!-r $csvfile) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment