summaryrefslogtreecommitdiffstats
path: root/test/helper-test.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-10-25 21:19:39 +0200
committerDave Davenport <qball@gmpclient.org>2016-10-25 21:19:39 +0200
commita38ac9caf3c17d1f92cbc8696c39644d6a74241f (patch)
tree320178ee139f531f1d8325e5c1ef4341ceacf5ba /test/helper-test.c
parent8a186726f8fa8f2015c1faa9db0d34fe2eb13cfd (diff)
Update scrollbar behaviour, so dragging is more natural. (limit range from hw/2 to h-hw/2)
Diffstat (limited to 'test/helper-test.c')
-rw-r--r--test/helper-test.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/helper-test.c b/test/helper-test.c
index 4ed00128..ad88a0cf 100644
--- a/test/helper-test.c
+++ b/test/helper-test.c
@@ -82,36 +82,36 @@ int main ( int argc, char ** argv )
* Quick converision check.
*/
{
- char *str = rofi_latin_to_utf8_strdup ( "\xA1\xB5", 2);
- TASSERT ( g_utf8_collate ( str, "¡µ") == 0 );
- g_free(str);
+ char *str = rofi_latin_to_utf8_strdup ( "\xA1\xB5", 2 );
+ TASSERT ( g_utf8_collate ( str, "¡µ" ) == 0 );
+ g_free ( str );
}
-
+
{
- char *str = rofi_force_utf8("Valid utf8", 10);
- TASSERT ( g_utf8_collate ( str, "Valid utf8") == 0 );
- g_free(str);
+ char *str = rofi_force_utf8 ( "Valid utf8", 10 );
+ TASSERT ( g_utf8_collate ( str, "Valid utf8" ) == 0 );
+ g_free ( str );
char in[] = "Valid utf8 until \xc3\x28 we continue here";
TASSERT ( g_utf8_validate ( in, -1, NULL ) == FALSE );
- str = rofi_force_utf8(in, strlen(in));
+ str = rofi_force_utf8 ( in, strlen ( in ) );
TASSERT ( g_utf8_validate ( str, -1, NULL ) == TRUE );
- TASSERT ( g_utf8_collate ( str, "Valid utf8 until �( we continue here") == 0 );
- g_free(str);
- }
+ TASSERT ( g_utf8_collate ( str, "Valid utf8 until �( we continue here" ) == 0 );
+ g_free ( str );
+ }
// Pid test.
// Tests basic functionality of writing it, locking, seeing if I can write same again
// And close/reopen it again.
{
- const char *path = "/tmp/rofi-test.pid";
- TASSERT( create_pid_file ( NULL ) == -1 );
- int fd = create_pid_file ( path );
- TASSERT( fd >= 0 );
- int fd2 = create_pid_file ( path );
- TASSERT ( fd2 < 0 );
+ const char *path = "/tmp/rofi-test.pid";
+ TASSERT ( create_pid_file ( NULL ) == -1 );
+ int fd = create_pid_file ( path );
+ TASSERT ( fd >= 0 );
+ int fd2 = create_pid_file ( path );
+ TASSERT ( fd2 < 0 );
remove_pid_file ( fd );
fd = create_pid_file ( path );
- TASSERT( fd >= 0 );
+ TASSERT ( fd >= 0 );
remove_pid_file ( fd );
}
}