ik_llama_opt/tests
Anton Sokolchenko 05a61510b9 Fix Qwen3 content extraction breaking code formatting (#661)
Problem:
- qwen3::extract_content_during_parsing() used aggressive regex to collapse multiple newlines
- This broke proper code formatting (e.g., PEP 8's 2 empty lines between functions)
- Affected non-tool-call streaming output where formatting is critical

Solution:
- Replace aggressive std::regex_replace(R"(\n\s*\n)", "\n") with gentle string_strip()
- Follow original llama.cpp patterns: only trim leading/trailing whitespace
- Preserve internal formatting including multiple newlines
- Add proper include for common.h to access string_strip function

Changes:
- examples/server/parsers/qwen3_parser.hpp: Replace whitespace cleanup with string_strip()
- tests/test-function-calls.cpp: Add test_qwen3_whitespace_preservation() to prevent regression

Testing:
-  PEP 8 compliance: 2 empty lines between functions preserved
-  Tool call parsing: All Qwen3 tests continue to pass
-  No regressions: Existing functionality maintained
-  Follows original llama.cpp whitespace handling patterns
2025-08-07 08:22:01 +03:00
..
.gitignore tests : gitignore ggml-common.h 2024-03-09 14:17:11 +02:00
CMakeLists.txt Function calling support for Kimi-K2 (#628) 2025-07-23 18:11:42 +02:00
get-model.cpp ci : add model tests + script wrapper (#4586) 2024-01-26 14:18:00 +02:00
get-model.h ci : add model tests + script wrapper (#4586) 2024-01-26 14:18:00 +02:00
run-json-schema-to-grammar.mjs json-schema-to-grammar improvements (+ added to server) (#5978) 2024-03-21 11:50:43 +00:00
test-autorelease.cpp ggml : add numa options (#5377) 2024-02-16 11:31:07 +02:00
test-backend-ops.cpp Faster Gemma2 (#27) 2024-08-27 17:40:59 +03:00
test-c.c Nomic Vulkan backend (#4456) 2024-01-29 15:50:50 -05:00
test-chat-template.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-double-float.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-function-calls.cpp Fix Qwen3 content extraction breaking code formatting (#661) 2025-08-07 08:22:01 +03:00
test-grad0.cpp ggml : refactor rope norm/neox (#7634) 2024-06-05 11:29:20 +03:00
test-grammar-integration.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-grammar-parser.cpp grammars: x{min,max} repetition operator (#6640) 2024-06-06 10:07:06 +01:00
test-json-schema-to-grammar.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-llama-grammar.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-model-load-cancel.cpp ggml : add numa options (#5377) 2024-02-16 11:31:07 +02:00
test-opt.cpp code : normalize enum names (#5697) 2024-02-25 12:09:09 +02:00
test-quantize-fns.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-quantize-perf.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-rope.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-sampling.cpp Merge mainline - Aug 12 2024 (#17) 2024-08-12 15:14:32 +02:00
test-tokenizer-0.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-tokenizer-0.py py : logging and flake8 suppression refactoring (#7081) 2024-05-05 08:07:48 +03:00
test-tokenizer-0.sh tests : fix test-tokenizer-0.sh 2024-05-28 15:04:09 +03:00
test-tokenizer-1-bpe.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-tokenizer-1-spm.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-tokenizer-random.py Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00