summaryrefslogtreecommitdiffstats
path: root/test/test_string.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-26 19:22:03 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 14:15:00 +0100
commit31cc05d5ef6e840ebe2b4c265f374f913f4758cc (patch)
tree87302811f8df1f16e0bd4785ff405906a993b7d0 /test/test_string.c
parent7a51f0b8e95d29b5e053db97bf72094e847ee7ef (diff)
downloadlilv-31cc05d5ef6e840ebe2b4c265f374f913f4758cc.tar.gz
lilv-31cc05d5ef6e840ebe2b4c265f374f913f4758cc.tar.bz2
lilv-31cc05d5ef6e840ebe2b4c265f374f913f4758cc.zip
Format all code with clang-format
Diffstat (limited to 'test/test_string.c')
-rw-r--r--test/test_string.c40
1 files changed, 20 insertions, 20 deletions
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 <windows.h>
-# define setenv(n, v, r) SetEnvironmentVariable((n), (v))
-# define unsetenv(n) SetEnvironmentVariable((n), NULL)
+# include <windows.h>
+# define setenv(n, v, r) SetEnvironmentVariable((n), (v))
+# define unsetenv(n) SetEnvironmentVariable((n), NULL)
#endif
#include <assert.h>
@@ -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;
}