diff --git a/test/fixture_foo.h b/test/fixture_foo.h new file mode 100644 index 00000000..0456d7d4 --- /dev/null +++ b/test/fixture_foo.h @@ -0,0 +1,3 @@ +int fooInit() { + return 1; +} diff --git a/test/regression.carp b/test/regression.carp new file mode 100644 index 00000000..3c06e563 --- /dev/null +++ b/test/regression.carp @@ -0,0 +1,20 @@ +(local-include "../test/fixture_foo.h") +(load "Test.carp") +(load "Vector.carp") + +; this is a test-only module to test module resolution (see #288) +(defmodule Foo + (register init (Fn [] Int) "fooInit") +) + +(use-all Test Vector2 Foo) + +(defn main [] + (with-test test + (assert-equal test + 1 + (init) + "test that the right module gets resolved" + ) + ) +)