mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
New file from test11.m.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1373 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9e2c0d5bd4
commit
24a3487b03
1 changed files with 31 additions and 0 deletions
31
Testing/nxst.m
Normal file
31
Testing/nxst.m
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/* Test NXStringTable class. */
|
||||||
|
|
||||||
|
#include <objc/NXStringTable.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
id table;
|
||||||
|
int i, times;
|
||||||
|
|
||||||
|
if (argc < 2) {
|
||||||
|
fprintf(stderr, "Usage: table_test filename repeat\n");
|
||||||
|
fprintf(stderr, " filename is a stringtable format file.\n");
|
||||||
|
fprintf(stderr, " repeat is a number of times to loop\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if (argc == 3)
|
||||||
|
times = atoi(argv[2]);
|
||||||
|
else
|
||||||
|
times = 1;
|
||||||
|
|
||||||
|
table = [[NXStringTable alloc] init];
|
||||||
|
|
||||||
|
for (i=0; i < times; i++) {
|
||||||
|
[table readFromFile:argv[1]];
|
||||||
|
printf("-----------------------------------------\n");
|
||||||
|
[table writeToStream:stdout];
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue