projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b4c5933
)
fstrcmp-tests and filenamecat-tests: Use progname module.
author
Simon Josefsson
<simon@josefsson.org>
Mon, 19 Jan 2009 09:58:57 +0000
(10:58 +0100)
committer
Simon Josefsson
<simon@josefsson.org>
Mon, 19 Jan 2009 09:58:57 +0000
(10:58 +0100)
ChangeLog
patch
|
blob
|
history
modules/filenamecat-tests
patch
|
blob
|
history
modules/fstrcmp-tests
patch
|
blob
|
history
tests/test-filenamecat.c
patch
|
blob
|
history
tests/test-fstrcmp.c
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index b56bb2eb3b587e550d8094011543a2cd296e1365..a435cfa4a330b94e542e38a3ba50f8010321650c 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,12
@@
+2009-01-18 Simon Josefsson <simon@josefsson.org>
+
+ * modules/filenamecat-tests (Depends-on): Add progname.
+ * modules/fstrcmp-tests (Depends-on): Likewise.
+
+ * tests/test-filenamecat.c: Use progname module, to avoid link
+ errors on non-glibc systems.
+ * tests/test-fstrcmp.c: Likewise.
+
2009-01-19 Daniel P. Berrange <berrange@redhat.com>
gettimeofday: avoid warning: nested extern declaration of 'localtime'
2009-01-19 Daniel P. Berrange <berrange@redhat.com>
gettimeofday: avoid warning: nested extern declaration of 'localtime'
diff --git
a/modules/filenamecat-tests
b/modules/filenamecat-tests
index 14d3c1777e4c09301bd21af46144cb674d17a162..93ccac1407bc643812dccc1902a81a2c55a28762 100644
(file)
--- a/
modules/filenamecat-tests
+++ b/
modules/filenamecat-tests
@@
-3,6
+3,7
@@
tests/test-filenamecat.c
Depends-on:
stdbool
Depends-on:
stdbool
+progname
configure.ac:
configure.ac:
diff --git
a/modules/fstrcmp-tests
b/modules/fstrcmp-tests
index cb9eff589c0026e14bc5298cb4fdfcf24905653c..c7dcda5e215b758cf7c4a7f498e6ab0061987d8b 100644
(file)
--- a/
modules/fstrcmp-tests
+++ b/
modules/fstrcmp-tests
@@
-3,6
+3,7
@@
tests/test-fstrcmp.c
Depends-on:
stdbool
Depends-on:
stdbool
+progname
configure.ac:
configure.ac:
diff --git
a/tests/test-filenamecat.c
b/tests/test-filenamecat.c
index 879a186aca717b25b9169cb701c2aa51071814ad..d102ef627fd2402a06f9ba9e22216a1e0fe3635d 100644
(file)
--- a/
tests/test-filenamecat.c
+++ b/
tests/test-filenamecat.c
@@
-1,6
+1,6
@@
/* Test of concatenation of two arbitrary file names.
/* Test of concatenation of two arbitrary file names.
- Copyright (C) 1996-2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007
, 2009
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-26,8
+26,10
@@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
+#include "progname.h"
+
int
int
-main ()
+main (
int argc, char *argv[]
)
{
static char const *const tests[][3] =
{
{
static char const *const tests[][3] =
{
@@
-46,6
+48,9
@@
main ()
};
unsigned int i;
bool fail = false;
};
unsigned int i;
bool fail = false;
+
+ set_program_name (argv[0]);
+
for (i = 0; i < sizeof tests / sizeof tests[0]; i++)
{
char *base_in_result;
for (i = 0; i < sizeof tests / sizeof tests[0]; i++)
{
char *base_in_result;
diff --git
a/tests/test-fstrcmp.c
b/tests/test-fstrcmp.c
index b266b59460453489051c7f9be2c13855e9e29121..69845508d557ef28ace3a18d0b8de14d809b10ca 100644
(file)
--- a/
tests/test-fstrcmp.c
+++ b/
tests/test-fstrcmp.c
@@
-1,5
+1,5
@@
/* Test of fuzzy string comparison.
/* Test of fuzzy string comparison.
- Copyright (C) 2007-200
8
Free Software Foundation, Inc.
+ Copyright (C) 2007-200
9
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-24,6
+24,8
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include "progname.h"
+
#define ASSERT(expr) \
do \
{ \
#define ASSERT(expr) \
do \
{ \
@@
-75,8
+77,10
@@
check_fstrcmp (const char *string1, const char *string2, double expected)
}
int
}
int
-main ()
+main (
int argc, char *argv[]
)
{
{
+ set_program_name (argv[0]);
+
ASSERT (check_fstrcmp ("Langstrumpf", "Langstrumpf", 1.0));
ASSERT (check_fstrcmp ("Levenshtein", "Levenstein", 20./21.));
ASSERT (check_fstrcmp ("Levenstein", "Levenshtein", 20./21.));
ASSERT (check_fstrcmp ("Langstrumpf", "Langstrumpf", 1.0));
ASSERT (check_fstrcmp ("Levenshtein", "Levenstein", 20./21.));
ASSERT (check_fstrcmp ("Levenstein", "Levenshtein", 20./21.));