[ Version ( since = "2.16" ) ]
public void bug_base (string uri_pattern)
Specifies the base URI for bug reports.
The base URI is used to construct bug report messages for [func@GLib.test_message] when [func@GLib.test_bug] is called. Calling this
function outside of a test case sets the default base URI for all test cases. Calling it from within a test case changes the base URI for
the scope of the test case only. Bug URIs are constructed by appending a bug specific URI portion to uri_pattern, or by
replacing the special string `s` within uri_pattern if that is present.
If [func@GLib.test_bug_base] is not called, bug URIs are formed solely from the value provided by [func@GLib.test_bug].
Example: Bug tracker integration:
public static int main (string[] args) {
Test.init (ref args);
Test.bug_base ("http://bugzilla.gnome.org/");
Test.add_func ("/libvaladoc/driver-0.12.x", () => {
// Output: ``(MSG: Bug Reference: http://bugzilla.gnome.org/504142)``
// Only visible with ./test --verbose!
Test.bug ("504142");
});
Test.run ();
return 0;
}
valac --pkg glib-2.0 GLib.Test.bug.vala
./GLib.Test.bug --verbose
| uri_pattern |
the base pattern for bug URIs |