add_action.c

v22.2b14/testsuite/single/tests/efuns/add_action.c · 329 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

int called;
int xverb;

void do_tests() {
#ifndef __NO_ADD_ACTION__
    object tp;
    xverb = called = 0;
    SAVETP;
    enable_commands();
    add_action( (: called = 1 :), "foo");
    add_action( (: xverb = 1 :), "b", 1);
    RESTORETP;
    command("foo");
    command("bar");
    ASSERT(called);
    ASSERT(xverb);
#endif
}

Site Stats

Snippets: 1791
Codebases: 571