mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +00:00
CppLanguageServer: Put cpp test files in /home/anon/cpp-tests/
This is similar to the LibJS test data that resides in /home/anon/js-tests. It's more convenient than storing the test programs as raw strings in the code.
This commit is contained in:
parent
28ed518142
commit
eeb98335d5
8 changed files with 47 additions and 37 deletions
|
@ -104,10 +104,12 @@ mkdir -p mnt/home/anon
|
|||
mkdir -p mnt/home/anon/Desktop
|
||||
mkdir -p mnt/home/anon/Downloads
|
||||
mkdir -p mnt/home/nona
|
||||
rm -fr mnt/home/anon/js-tests mnt/home/anon/web-tests
|
||||
rm -fr mnt/home/anon/js-tests mnt/home/anon/web-tests mnt/home/anon/cpp-tests
|
||||
mkdir -p mnt/home/anon/cpp-tests/
|
||||
cp "$SERENITY_SOURCE_DIR"/README.md mnt/home/anon/
|
||||
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibJS/Tests mnt/home/anon/js-tests
|
||||
cp -r "$SERENITY_SOURCE_DIR"/Userland/Libraries/LibWeb/Tests mnt/home/anon/web-tests
|
||||
cp -r "$SERENITY_SOURCE_DIR"/Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests mnt/home/anon/cpp-tests/comprehension
|
||||
chmod 700 mnt/root
|
||||
chmod 700 mnt/home/anon
|
||||
chmod 700 mnt/home/nona
|
||||
|
|
|
@ -12,7 +12,7 @@ cd "$script_path/.." || exit 1
|
|||
# */
|
||||
GOOD_LICENSE_HEADER_PATTERN=$'^/\*\n( \* Copyright \(c\) [0-9]{4}(-[0-9]{4})?, .*\n)+ \*\n \* SPDX-License-Identifier: BSD-2-Clause\n \*/\n\n'
|
||||
BAD_LICENSE_HEADER_ERRORS=()
|
||||
LICENSE_HEADER_CHECK_EXCUDES=(AK/Checked.h AK/Function.h Userland/Libraries/LibC/elf.h)
|
||||
LICENSE_HEADER_CHECK_EXCLUDES=(AK/Checked.h AK/Function.h Userland/Libraries/LibC/elf.h Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/*)
|
||||
|
||||
# We check that "#pragma once" is present
|
||||
PRAGMA_ONCE_PATTERN='#pragma once'
|
||||
|
@ -28,7 +28,7 @@ LIBM_MATH_H_INCLUDE_ERRORS=()
|
|||
|
||||
while IFS= read -r f; do
|
||||
file_content="$(< "$f")"
|
||||
if [[ ! "${LICENSE_HEADER_CHECK_EXCUDES[*]} " =~ $f ]]; then
|
||||
if [[ ! "${LICENSE_HEADER_CHECK_EXCLUDES[*]} " =~ $f ]]; then
|
||||
if [[ ! "$file_content" =~ $GOOD_LICENSE_HEADER_PATTERN ]]; then
|
||||
BAD_LICENSE_HEADER_ERRORS+=("$f")
|
||||
fi
|
||||
|
|
|
@ -12,7 +12,8 @@ if [ "$#" -eq "1" ]; then
|
|||
'*.h' \
|
||||
':!:Base' \
|
||||
':!:Kernel/FileSystem/ext2_fs.h' \
|
||||
':!:Userland/Libraries/LibC/syslog.h'
|
||||
':!:Userland/Libraries/LibC/syslog.h' \
|
||||
':!:Userland/DevTools/HackStudio/LanguageServers/Cpp/Tests/*'
|
||||
)
|
||||
else
|
||||
files=()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue