mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
tests: add regression tests for #288
This commit is contained in:
parent
bcaf8a6904
commit
3080671967
3
test/fixture_foo.h
Normal file
3
test/fixture_foo.h
Normal file
@ -0,0 +1,3 @@
|
||||
int fooInit() {
|
||||
return 1;
|
||||
}
|
20
test/regression.carp
Normal file
20
test/regression.carp
Normal file
@ -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"
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user