From 31cc05d5ef6e840ebe2b4c265f374f913f4758cc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 26 Dec 2020 19:22:03 +0100 Subject: Format all code with clang-format --- test/test_string.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'test/test_string.c') diff --git a/test/test_string.c b/test/test_string.c index 9eb2456..e66accf 100644 --- a/test/test_string.c +++ b/test/test_string.c @@ -21,9 +21,9 @@ #include "../src/lilv_internal.h" #ifdef _WIN32 -# include -# define setenv(n, v, r) SetEnvironmentVariable((n), (v)) -# define unsetenv(n) SetEnvironmentVariable((n), NULL) +# include +# define setenv(n, v, r) SetEnvironmentVariable((n), (v)) +# define unsetenv(n) SetEnvironmentVariable((n), NULL) #endif #include @@ -34,23 +34,23 @@ int main(void) { #ifndef _WIN32 - char* s = NULL; - - setenv("LILV_TEST_1", "test", 1); - char* home_foo = lilv_strjoin(getenv("HOME"), "/foo", NULL); - assert(!strcmp((s = lilv_expand("$LILV_TEST_1")), "test")); - free(s); - assert(!strcmp((s = lilv_expand("~")), getenv("HOME"))); - free(s); - assert(!strcmp((s = lilv_expand("~foo")), "~foo")); - free(s); - assert(!strcmp((s = lilv_expand("~/foo")), home_foo)); - free(s); - assert(!strcmp((s = lilv_expand("$NOT_A_VAR")), "$NOT_A_VAR")); - free(s); - free(home_foo); - unsetenv("LILV_TEST_1"); + char* s = NULL; + + setenv("LILV_TEST_1", "test", 1); + char* home_foo = lilv_strjoin(getenv("HOME"), "/foo", NULL); + assert(!strcmp((s = lilv_expand("$LILV_TEST_1")), "test")); + free(s); + assert(!strcmp((s = lilv_expand("~")), getenv("HOME"))); + free(s); + assert(!strcmp((s = lilv_expand("~foo")), "~foo")); + free(s); + assert(!strcmp((s = lilv_expand("~/foo")), home_foo)); + free(s); + assert(!strcmp((s = lilv_expand("$NOT_A_VAR")), "$NOT_A_VAR")); + free(s); + free(home_foo); + unsetenv("LILV_TEST_1"); #endif - return 0; + return 0; } -- cgit v1.2.1