[gnumeric] Tests: check for graph and function plugins too.



commit a005264f2c877a36297306d2268f2c576787475f
Author: Morten Welinder <terra gnome org>
Date:   Sat Apr 14 08:42:07 2018 -0400

    Tests: check for graph and function plugins too.

 src/func.c                          |    7 +++++++
 test/t3003-introspection-plugins.pl |   13 ++++++++++++-
 test/t3003-introspection-plugins.py |   10 ++++++++++
 3 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/src/func.c b/src/func.c
index bcaba9c..e23530a 100644
--- a/src/func.c
+++ b/src/func.c
@@ -747,6 +747,13 @@ gnm_func_set_user_data (GnmFunc *func, gpointer user_data)
        func->user_data = user_data;
 }
 
+/**
+ * gnm_func_get_name:
+ * @func: #GnmFunc to query
+ * @localized_function_names: if %TRUE, use localized name
+ *
+ * Returns: (transfer none): @func's name
+ */
 char const *
 gnm_func_get_name (GnmFunc const *func, gboolean localized_function_names)
 {
diff --git a/test/t3003-introspection-plugins.pl b/test/t3003-introspection-plugins.pl
index 175c36e..9783fa6 100755
--- a/test/t3003-introspection-plugins.pl
+++ b/test/t3003-introspection-plugins.pl
@@ -18,5 +18,16 @@ $python_script =~ s/\.pl$/.py/;
                           /^Saver ID: Gnumeric_pdf:pdf_assistant$/m &&
                           # A few important loaders
                           /^Loader ID: Gnumeric_Excel:xlsx$/m &&
-                          /^Loader ID: Gnumeric_OpenCalc:openoffice$/m);
+                          /^Loader ID: Gnumeric_OpenCalc:openoffice$/m &&
+                          # A few important plot types
+                          /^Plot families: .*\bLine\b/m &&
+                          /^Plot families: .*\bBar\b/m &&
+                          /^Plot families: .*\bXY\b/m &&
+                          # A few functions
+                          /^Functions: .*\bsin\b/m &&
+                          /^Functions: .*\bvar\b/m &&
+                          /^Functions: .*\brandnorm\b/m &&
+                          /^Functions: .*\bweekday\b/m &&
+                          /^Functions: .*\bimsin\b/m
+                      );
               });
diff --git a/test/t3003-introspection-plugins.py b/test/t3003-introspection-plugins.py
index 98159ce..231eec8 100755
--- a/test/t3003-introspection-plugins.py
+++ b/test/t3003-introspection-plugins.py
@@ -39,3 +39,13 @@ for fo in GOffice.get_file_openers():
 print("")
 
 # -----------------------------------------------------------------------------
+
+print("Plot families: " + ", ".join (sorted(GOffice.GraphPlot.families())))
+print("")
+
+# -----------------------------------------------------------------------------
+
+print("Functions: " + ", ".join (sorted([f.get_name(0) for f in Gnm.Func.enumerate()])))
+print("")
+
+# -----------------------------------------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]