[vala/staging] tests: Relax dependency of asynchronous/method-main-async.vala on build environment




commit dbebb78a6b8775f1e3f696022c927db3075228f0
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Feb 2 09:09:24 2022 +0100

    tests: Relax dependency of asynchronous/method-main-async.vala on build environment
    
    See 45fe8523ad392f1aaa0f24d83b63e91774938775
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/1286

 tests/asynchronous/method-main-async.c-expected | 2 +-
 tests/asynchronous/method-main-async.vala       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/asynchronous/method-main-async.c-expected b/tests/asynchronous/method-main-async.c-expected
index 968f8eef4..e8148c4dc 100644
--- a/tests/asynchronous/method-main-async.c-expected
+++ b/tests/asynchronous/method-main-async.c-expected
@@ -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);
diff --git a/tests/asynchronous/method-main-async.vala b/tests/asynchronous/method-main-async.vala
index c28aa3506..1c994c317 100644
--- a/tests/asynchronous/method-main-async.vala
+++ b/tests/asynchronous/method-main-async.vala
@@ -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;
 }


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