diff --git a/tools/qfcc/test/linkdef1.r b/tools/qfcc/test/linkdef1.r new file mode 100644 index 000000000..67527d019 --- /dev/null +++ b/tools/qfcc/test/linkdef1.r @@ -0,0 +1,7 @@ +@extern integer foo (void); +@extern integer baz (void); + +integer bar (void) +{ + return foo () + baz (); +} diff --git a/tools/qfcc/test/linkdef2.r b/tools/qfcc/test/linkdef2.r new file mode 100644 index 000000000..133235f69 --- /dev/null +++ b/tools/qfcc/test/linkdef2.r @@ -0,0 +1,9 @@ +@extern integer bar (void); +@extern integer baz (void); +id obj; + +integer foo (void) +{ + [obj message]; + return bar () + baz ();; +} diff --git a/tools/qfcc/test/linkdef3.r b/tools/qfcc/test/linkdef3.r new file mode 100644 index 000000000..5ef61f149 --- /dev/null +++ b/tools/qfcc/test/linkdef3.r @@ -0,0 +1,10 @@ +@extern integer foo (void); +@extern integer bar (void); + +void __obj_exec_class (obj_module_t *msg) = #0; +id (id receiver, SEL op, ...) obj_msgSend = #0; + +integer baz (void) +{ + return foo () + bar (); +} diff --git a/tools/qfcc/test/test-linkdef b/tools/qfcc/test/test-linkdef new file mode 100755 index 000000000..97d6e482d --- /dev/null +++ b/tools/qfcc/test/test-linkdef @@ -0,0 +1,6 @@ +#! /bin/sh +./qfcc -gc linkdef1.r +./qfcc -gc linkdef2.r +./qfcc -gc linkdef3.r +./qfcc -rg -o linkdef.qfo linkdef1.qfo linkdef2.qfo linkdef3.qfo +./qfcc -g -o linkdef.dat linkdef1.qfo linkdef2.qfo linkdef3.qfo