]> git.mdlowis.com Git - proto/labwc.git/commitdiff
scripts/check: run style check for test files
authortokyo4j <hrak1529@gmail.com>
Sun, 19 Oct 2025 19:02:34 +0000 (04:02 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sun, 19 Oct 2025 19:12:38 +0000 (04:12 +0900)
Co-authored-by: @johanmalm
scripts/check
scripts/checkpatch.pl
t/buf-simple.c

index 40d48b1e375c03135a118411c456f8c8f60d03fd..473fcfdc3443dc962c468bb6ce276a0015937c8f 100755 (executable)
@@ -19,7 +19,7 @@ run_checks () {
                return $?
        fi
 
-       find src/ include/ clients/ \( -name "*.c" -o -name "*.h" \) -type f -print0 |
+       find src/ include/ clients/ t/ \( -name "*.c" -o -name "*.h" \) -type f -print0 |
        nice xargs -0 --max-args 1 --max-procs $(nproc) \
                scripts/checkpatch.pl --terse --no-tree --strict --file
        return $?
index 933dbc593f7cc0f74edb3d9abdf4a33b6dd1341c..217536a6415c44735cd2d6fe764300415649ebda 100755 (executable)
@@ -5661,6 +5661,7 @@ sub process {
                            $var !~ /^(?:GString|GError|GHashTable)/ &&
                            $var !~ /^(?:__FreeBSD__)/ &&
                            $var !~ /^(?:RsvgRectangle|RsvgHandle)/ &&
+                           $var !~ /^(?:CMUnitTest)/ &&
                            $var !~ /^(?:XKB_KEY_XF86Switch_VT_1)/ &&
 
 #Ignore SI style variants like nS, mV and dB
index 72d9fd401074fed26aa5d54e73b5c29460010114..d3ebaeb98ede995cc85352a29f20668d056cf784 100644 (file)
@@ -68,7 +68,12 @@ test_buf_add_fmt(void **state)
 static void
 test_buf_add_char(void **state)
 {
-       const char long_string[] = "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
+       static const char long_string[] =
+               "123456789012345678901234567890123456789012345678901234567890 "
+               "123456789012345678901234567890123456789012345678901234567890 "
+               "123456789012345678901234567890123456789012345678901234567890 "
+               "123456789012345678901234567890123456789012345678901234567890 "
+               "123456789012345678901234567890123456789012345678901234567890 ";
        size_t len = strlen(long_string);
 
        /*