summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-12-04 19:26:41 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2010-12-04 19:26:41 (GMT)
commit1154ed7ffffa15e4ff5317259feaa487581ef999 (patch)
tree3036d1794190480e11c2343f02ffaaf8d67e0ad1
parentcf1589716b4e895272f8cfe3e6c7c85de7b863af (diff)
downloadlibparserutils-1154ed7ffffa15e4ff5317259feaa487581ef999.tar.gz
libparserutils-1154ed7ffffa15e4ff5317259feaa487581ef999.tar.bz2
Remove Aliases file from test harnesses
svn path=/trunk/libparserutils/; revision=10979
-rw-r--r--test/aliases.c6
-rw-r--r--test/cscodec-8859.c8
-rw-r--r--test/cscodec-ext8.c8
-rw-r--r--test/cscodec-utf16.c8
-rw-r--r--test/cscodec-utf8.c8
-rw-r--r--test/filter.c6
-rw-r--r--test/inputstream.c8
-rw-r--r--test/regression/filter-badenc-segv.c6
-rw-r--r--test/regression/filter-segv.c6
-rw-r--r--test/regression/stream-nomem.c6
10 files changed, 30 insertions, 40 deletions
diff --git a/test/aliases.c b/test/aliases.c
index 819e4b5..3513c7f 100644
--- a/test/aliases.c
+++ b/test/aliases.c
@@ -9,10 +9,8 @@ int main (int argc, char **argv)
{
parserutils_charset_aliases_canon *c;
- if (argc != 2) {
- printf("Usage: %s <filename>\n", argv[0]);
- return 1;
- }
+ UNUSED(argc);
+ UNUSED(argv);
c = parserutils_charset_alias_canonicalise("moose", 5);
if (c) {
diff --git a/test/cscodec-8859.c b/test/cscodec-8859.c
index 7fd5a2f..bd7dfa4 100644
--- a/test/cscodec-8859.c
+++ b/test/cscodec-8859.c
@@ -42,15 +42,15 @@ int main(int argc, char **argv)
parserutils_charset_codec *codec;
line_ctx ctx;
- if (argc != 3) {
- printf("Usage: %s <aliases_file> <filename>\n", argv[0]);
+ if (argc != 2) {
+ printf("Usage: %s <filename>\n", argv[0]);
return 1;
}
assert(parserutils_charset_codec_create("NATS-SEFI-ADD",
myrealloc, NULL, &codec) == PARSERUTILS_BADENCODING);
- ctx.buflen = parse_filesize(argv[2]);
+ ctx.buflen = parse_filesize(argv[1]);
if (ctx.buflen == 0)
return 1;
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
ctx.inexp = false;
ctx.exp_ret = PARSERUTILS_OK;
- assert(parse_testfile(argv[2], handle_line, &ctx) == true);
+ assert(parse_testfile(argv[1], handle_line, &ctx) == true);
/* and run final test */
if (ctx.bufused > 0 && ctx.buf[ctx.bufused - 1] == '\n')
diff --git a/test/cscodec-ext8.c b/test/cscodec-ext8.c
index 7fd5a2f..bd7dfa4 100644
--- a/test/cscodec-ext8.c
+++ b/test/cscodec-ext8.c
@@ -42,15 +42,15 @@ int main(int argc, char **argv)
parserutils_charset_codec *codec;
line_ctx ctx;
- if (argc != 3) {
- printf("Usage: %s <aliases_file> <filename>\n", argv[0]);
+ if (argc != 2) {
+ printf("Usage: %s <filename>\n", argv[0]);
return 1;
}
assert(parserutils_charset_codec_create("NATS-SEFI-ADD",
myrealloc, NULL, &codec) == PARSERUTILS_BADENCODING);
- ctx.buflen = parse_filesize(argv[2]);
+ ctx.buflen = parse_filesize(argv[1]);
if (ctx.buflen == 0)
return 1;
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
ctx.inexp = false;
ctx.exp_ret = PARSERUTILS_OK;
- assert(parse_testfile(argv[2], handle_line, &ctx) == true);
+ assert(parse_testfile(argv[1], handle_line, &ctx) == true);
/* and run final test */
if (ctx.bufused > 0 && ctx.buf[ctx.bufused - 1] == '\n')
diff --git a/test/cscodec-utf16.c b/test/cscodec-utf16.c
index dd0ebb1..3eadaca 100644
--- a/test/cscodec-utf16.c
+++ b/test/cscodec-utf16.c
@@ -45,8 +45,8 @@ int main(int argc, char **argv)
parserutils_charset_codec *codec;
line_ctx ctx;
- if (argc != 3) {
- printf("Usage: %s <aliases_file> <filename>\n", argv[0]);
+ if (argc != 2) {
+ printf("Usage: %s <filename>\n", argv[0]);
return 1;
}
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
assert(parserutils_charset_codec_create("UTF-16", myrealloc, NULL,
&ctx.codec) == PARSERUTILS_OK);
- ctx.buflen = parse_filesize(argv[2]);
+ ctx.buflen = parse_filesize(argv[1]);
if (ctx.buflen == 0)
return 1;
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
ctx.inexp = false;
ctx.exp_ret = PARSERUTILS_OK;
- assert(parse_testfile(argv[2], handle_line, &ctx) == true);
+ assert(parse_testfile(argv[1], handle_line, &ctx) == true);
/* and run final test */
if (ctx.bufused > 0 && ctx.buf[ctx.bufused - 1] == '\n')
diff --git a/test/cscodec-utf8.c b/test/cscodec-utf8.c
index b0dcb89..c36961e 100644
--- a/test/cscodec-utf8.c
+++ b/test/cscodec-utf8.c
@@ -40,8 +40,8 @@ int main(int argc, char **argv)
parserutils_charset_codec *codec;
line_ctx ctx;
- if (argc != 3) {
- printf("Usage: %s <aliases_file> <filename>\n", argv[0]);
+ if (argc != 2) {
+ printf("Usage: %s <filename>\n", argv[0]);
return 1;
}
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
assert(parserutils_charset_codec_create("UTF-8", myrealloc, NULL,
&ctx.codec) == PARSERUTILS_OK);
- ctx.buflen = parse_filesize(argv[2]);
+ ctx.buflen = parse_filesize(argv[1]);
if (ctx.buflen == 0)
return 1;
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
ctx.inexp = false;
ctx.exp_ret = PARSERUTILS_OK;
- assert(parse_testfile(argv[2], handle_line, &ctx) == true);
+ assert(parse_testfile(argv[1], handle_line, &ctx) == true);
/* and run final test */
if (ctx.bufused > 0 && ctx.buf[ctx.bufused - 1] == '\n')
diff --git a/test/filter.c b/test/filter.c
index c66b684..dfbe38b 100644
--- a/test/filter.c
+++ b/test/filter.c
@@ -27,10 +27,8 @@ int main(int argc, char **argv)
const uint8_t *in = inbuf;
uint8_t *out = outbuf;
- if (argc != 2) {
- printf("Usage: %s <filename>\n", argv[0]);
- return 1;
- }
+ UNUSED(argc);
+ UNUSED(argv);
/* Create input filter */
assert(parserutils_filter_create("UTF-8", myrealloc, NULL, &input) ==
diff --git a/test/inputstream.c b/test/inputstream.c
index 99d3a3d..ba11e9c 100644
--- a/test/inputstream.c
+++ b/test/inputstream.c
@@ -31,17 +31,17 @@ int main(int argc, char **argv)
const uint8_t *c;
size_t clen;
- if (argc != 3) {
- printf("Usage: %s <aliases_file> <filename>\n", argv[0]);
+ if (argc != 2) {
+ printf("Usage: %s <filename>\n", argv[0]);
return 1;
}
assert(parserutils_inputstream_create("UTF-8", 1, NULL,
myrealloc, NULL, &stream) == PARSERUTILS_OK);
- fp = fopen(argv[2], "rb");
+ fp = fopen(argv[1], "rb");
if (fp == NULL) {
- printf("Failed opening %s\n", argv[2]);
+ printf("Failed opening %s\n", argv[1]);
return 1;
}
diff --git a/test/regression/filter-badenc-segv.c b/test/regression/filter-badenc-segv.c
index 0c9877a..5ca77e3 100644
--- a/test/regression/filter-badenc-segv.c
+++ b/test/regression/filter-badenc-segv.c
@@ -26,10 +26,8 @@ int main(int argc, char **argv)
expected = PARSERUTILS_BADENCODING;
#endif
- if (argc != 2) {
- printf("Usage: %s <filename>\n", argv[0]);
- return 1;
- }
+ UNUSED(argc);
+ UNUSED(argv);
assert(parserutils_filter_create("UTF-8", myrealloc, NULL, &input) ==
PARSERUTILS_OK);
diff --git a/test/regression/filter-segv.c b/test/regression/filter-segv.c
index 58905f9..b0e9586 100644
--- a/test/regression/filter-segv.c
+++ b/test/regression/filter-segv.c
@@ -18,10 +18,8 @@ int main(int argc, char **argv)
{
parserutils_filter *input;
- if (argc != 2) {
- printf("Usage: %s <filename>\n", argv[0]);
- return 1;
- }
+ UNUSED(argc);
+ UNUSED(argv);
assert(parserutils_filter_create("UTF-8", myrealloc, NULL, &input) ==
PARSERUTILS_OK);
diff --git a/test/regression/stream-nomem.c b/test/regression/stream-nomem.c
index 2f7707e..4545bea 100644
--- a/test/regression/stream-nomem.c
+++ b/test/regression/stream-nomem.c
@@ -29,10 +29,8 @@ int main(int argc, char **argv)
const uint8_t *c;
size_t clen;
- if (argc != 2) {
- printf("Usage: %s <aliases_file>\n", argv[0]);
- return 1;
- }
+ UNUSED(argc);
+ UNUSED(argv);
/* Populate the buffer with something sane */
memset(input_buffer, 'a', BUFFER_SIZE);