more tests

This commit is contained in:
rsc 2006-05-22 14:56:13 +00:00
parent e17e1a71c2
commit 4b65e43c54
4 changed files with 93 additions and 7 deletions

14
src/lib9/testprint.c Normal file
View file

@ -0,0 +1,14 @@
#include <u.h>
#include <libc.h>
void
main(int argc, char **argv)
{
char c;
c = argv[1][strlen(argv[1])-1];
if(c == 'f' || c == 'e' || c == 'g' || c == 'F' || c == 'E' || c == 'G')
print(argv[1], atof(argv[2]));
else if(c == 'x' || c == 'u' || c == 'd' || c == 'c' || c == 'C' || c == 'X')
print(argv[1], atoi(argv[2]));
}