more tests
This commit is contained in:
parent
e17e1a71c2
commit
4b65e43c54
4 changed files with 93 additions and 7 deletions
14
src/lib9/testprint.c
Normal file
14
src/lib9/testprint.c
Normal 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]));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue