make tests actually work

This commit is contained in:
jlamothe 2023-11-04 21:56:07 +00:00
parent 2a24b1586f
commit 8275f71479
5 changed files with 20 additions and 8 deletions

7
mkfile
View File

@ -1,12 +1,13 @@
</$objtype/mkfile
HEADERS=lib.h
qfmt: main.$O lib.$O
$LD $LDFLAGS -o qfmt main.$O lib.$O
$O.qfmt: test.$O test/init.$O lib.$O
$LD $LDFLAGS -o $O.qfmt test.$O test/init.$O lib.$O
test: qfmt
TEST=qfmt
TEST=test
</sys/src/cmd/mktest

View File

@ -2,10 +2,10 @@
#include <libc.h>
void
test_init()
test_init(void)
{
print("testing: init()");
print("tests not yet defined");
print("testing: init()\n");
print("tests not yet defined\n");
}
//jl

View File

@ -1,3 +1,3 @@
extern void test_init();
extern void test_init(void);
//jl

11
test/mkfile Normal file
View File

@ -0,0 +1,11 @@
</$objtype/mkfile
HEADERS=init.h ../init.h
$O.test: test.$O init.$O ../lib.$O
TEST=test
</sys/src/cmd/mktest
#jl

View File

@ -1,7 +1,7 @@
#include <u.h>
#include <libc.h>
#include "test/init.h"
#include "init.h"
void
main()