]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Relax dependency of asynchronous/method-main-async.vala on build environment
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 2 Feb 2022 08:09:24 +0000 (09:09 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 3 Feb 2022 11:13:19 +0000 (12:13 +0100)
See 45fe8523ad392f1aaa0f24d83b63e91774938775

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1286

tests/asynchronous/method-main-async.c-expected
tests/asynchronous/method-main-async.vala

index 968f8eef46ae6546c182048c48cbf7d921ef5a1e..e8148c4dcd18e96a57fc04737d9564ec9d24a72b 100644 (file)
@@ -102,7 +102,7 @@ _vala_main_async_co (ValaMainAsyncData* _data_)
        return FALSE;
        _state_1:
        ;
-       _vala_assert (g_strcmp0 (_data_->foo, "./asynchronous_method_main_async") == 0, "foo == \"./asynchronous_method_main_async\"");
+       _vala_assert (g_str_has_suffix (_data_->foo, "asynchronous_method_main_async"), "foo.has_suffix (\"asynchronous_method_main_async\")");
        _data_->result = 0;
        _g_free0 (_data_->foo);
        g_task_return_pointer (_data_->_async_result, _data_, NULL);
index c28aa35065345d834af6c0a2e2500a80fac3ae33..1c994c317524d8a1b9f784193300bec5e12e6bc3 100644 (file)
@@ -6,6 +6,6 @@ async int main (string[] args) {
        Idle.add (main.callback);
        yield;
 
-       assert (foo == "./asynchronous_method_main_async");
+       assert (foo.has_suffix ("asynchronous_method_main_async"));
        return 0;
 }