[Top][All Lists]

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

[bug#31788] [PATCH] tests: Honor the return value of 'start-service'.

From: Clément Lassieur
Subject: [bug#31788] [PATCH] tests: Honor the return value of 'start-service'.
Date: Tue, 12 Jun 2018 22:50:57 +0200
User-agent: mu4e 1.0; emacs 26.1

Ludovic Courtès <address@hidden> writes:

> I’m not entirely sure about things like this:
> -          (test-eq "service running"
> -            'running!
> +          (test-assert "service running"
>              (marionette-eval
>               '(begin
>                  (use-modules (gnu services herd))
> -                (start-service 'mcron)
> -                'running!)
> +                (start-service 'mcron))
>               marionette))
> ‘start-service’ in this case returns a number (the PID), and I think
> ‘test-assert’ reports a failure when the value is not exactly #t.  Isn’t
> it the case?

srfi-64 says: "The test passes if the result is true", so I believe
test-assert reports a failure only when the value is #f (and maybe on
exceptions), because anything else is true in Scheme.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]