summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page30
-rw-r--r--tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page32
-rw-r--r--tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page32
-rw-r--r--tests/scanner/Regress-1.0-expected.gir6
-rw-r--r--tests/scanner/Regress-1.0-sections-expected.txt1
-rw-r--r--tests/scanner/regress.c17
-rw-r--r--tests/scanner/regress.h3
7 files changed, 121 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page b/tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page
new file mode 100644
index 00000000..525b9361
--- /dev/null
+++ b/tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<page id="Regress.test_null_strv_in_gvalue"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>GValue*</api:type>
+ </api:returns>
+ <api:name>regress_test_null_strv_in_gvalue</api:name>
+ </api:function>
+ </info>
+ <title>regress_test_null_strv_in_gvalue</title>
+ <synopsis><code mime="text/x-csrc">
+GValue* regress_test_null_strv_in_gvalue (void);
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page
new file mode 100644
index 00000000..d1a10a39
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<page id="Regress.test_null_strv_in_gvalue"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>Any</api:type>
+ </api:returns>
+ <api:name>regress_test_null_strv_in_gvalue</api:name>
+ </api:function>
+ </info>
+ <title>Regress.test_null_strv_in_gvalue</title>
+ <synopsis><code mime="text/x-gjs">
+function test_null_strv_in_gvalue(): Any {
+ // Gjs wrapper for regress_test_null_strv_in_gvalue()
+}
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page b/tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page
new file mode 100644
index 00000000..e0828b4b
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<page id="Regress.test_null_strv_in_gvalue"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>GObject.Value</api:type>
+ </api:returns>
+ <api:name>regress_test_null_strv_in_gvalue</api:name>
+ </api:function>
+ </info>
+ <title>Regress.test_null_strv_in_gvalue</title>
+ <synopsis><code mime="text/x-python">
+@returns(GObject.Value)
+def test_null_strv_in_gvalue():
+ # Python wrapper for regress_test_null_strv_in_gvalue()
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+{formatter.format(node, node.retval.doc)}
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index a9f59724..91efacc9 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -6358,6 +6358,12 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
</parameter>
</parameters>
</function>
+ <function name="test_null_strv_in_gvalue"
+ c:identifier="regress_test_null_strv_in_gvalue">
+ <return-value transfer-ownership="full">
+ <type name="GObject.Value" c:type="GValue*"/>
+ </return-value>
+ </function>
<function name="test_owned_gerror_callback"
c:identifier="regress_test_owned_gerror_callback">
<return-value transfer-ownership="none">
diff --git a/tests/scanner/Regress-1.0-sections-expected.txt b/tests/scanner/Regress-1.0-sections-expected.txt
index 8aa818e7..a9574f94 100644
--- a/tests/scanner/Regress-1.0-sections-expected.txt
+++ b/tests/scanner/Regress-1.0-sections-expected.txt
@@ -159,6 +159,7 @@ regress_test_multiline_doc_comments
regress_test_nested_parameter
regress_test_noptr_callback
regress_test_null_gerror_callback
+regress_test_null_strv_in_gvalue
regress_test_owned_gerror_callback
regress_test_return_allow_none
regress_test_return_nullable
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 638587e3..153b6d49 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -4122,6 +4122,23 @@ regress_test_strv_in_gvalue (void)
}
/**
+ * regress_test_null_strv_in_gvalue:
+ *
+ * Returns: (transfer full):
+ */
+GValue *
+regress_test_null_strv_in_gvalue (void)
+{
+ GValue *value = g_new0 (GValue, 1);
+ const char **strv = NULL;
+
+ g_value_init (value, G_TYPE_STRV);
+ g_value_set_boxed (value, strv);
+
+ return value;
+}
+
+/**
* regress_test_multiline_doc_comments:
*
* This is a function.
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index 4771cc68..f7205f38 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -1278,6 +1278,9 @@ GValue *regress_test_date_in_gvalue (void);
_GI_TEST_EXTERN
GValue *regress_test_strv_in_gvalue (void);
+_GI_TEST_EXTERN
+GValue *regress_test_null_strv_in_gvalue (void);
+
_GI_TEST_EXTERN
GObject * _regress_this_is_a_private_symbol (void);