remove_action.c

v22.2b14/testsuite/single/tests/efuns/remove_action.c · 283 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

int called = 0;

void func() { called = 1; }

void do_tests() {
#ifndef __NO_ADD_ACTION__
    object tp;

    SAVETP;
    enable_commands();
    add_action( "func", "bar" );
    ASSERT(remove_action( "func", "bar" ));
    RESTORETP;
    command("bar");
    ASSERT(!called);
#endif
}

Site Stats

Snippets: 1791
Codebases: 571