summaryrefslogtreecommitdiff
path: root/src/test/test-libudev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-libudev.c')
-rw-r--r--src/test/test-libudev.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c
index 10bf365035..15c0f8853d 100644
--- a/src/test/test-libudev.c
+++ b/src/test/test-libudev.c
@@ -7,6 +7,7 @@
#include <unistd.h>
#include "alloc-util.h"
+#include "build.h"
#include "fd-util.h"
#include "libudev-list-internal.h"
#include "libudev-util.h"
@@ -364,16 +365,23 @@ static void test_util_replace_whitespace(void) {
test_util_replace_whitespace_one_len("hoge hoge ", 1, "h");
test_util_replace_whitespace_one_len("hoge hoge ", 0, "");
- test_util_replace_whitespace_one_len(" hoge hoge ", 9, "hoge_hoge");
- test_util_replace_whitespace_one_len(" hoge hoge ", 8, "hoge_hog");
- test_util_replace_whitespace_one_len(" hoge hoge ", 7, "hoge_ho");
- test_util_replace_whitespace_one_len(" hoge hoge ", 6, "hoge_h");
- test_util_replace_whitespace_one_len(" hoge hoge ", 5, "hoge");
- test_util_replace_whitespace_one_len(" hoge hoge ", 4, "hoge");
- test_util_replace_whitespace_one_len(" hoge hoge ", 3, "hog");
- test_util_replace_whitespace_one_len(" hoge hoge ", 2, "ho");
- test_util_replace_whitespace_one_len(" hoge hoge ", 1, "h");
- test_util_replace_whitespace_one_len(" hoge hoge ", 0, "");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 16, "hoge_hoge");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 15, "hoge_hoge");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 14, "hoge_hog");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 13, "hoge_ho");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 12, "hoge_h");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 11, "hoge");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 10, "hoge");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 9, "hoge");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 8, "hoge");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 7, "hog");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 6, "ho");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 5, "h");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 4, "");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 3, "");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 2, "");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 1, "");
+ test_util_replace_whitespace_one_len(" hoge hoge ", 0, "");
}
static void test_util_resolve_subsys_kernel_one(const char *str, bool read_value, int retval, const char *expected) {
@@ -507,7 +515,7 @@ int main(int argc, char *argv[]) {
return EXIT_SUCCESS;
case 'V':
- printf("%s\n", PACKAGE_VERSION);
+ printf("%s\n", GIT_VERSION);
return EXIT_SUCCESS;
case 'm':