Release v0.1.5.4 prepare for release

This commit is contained in:
2025-08-29 12:08:10 +02:00
parent a173c99015
commit 47b36588d3
371 changed files with 84993 additions and 30 deletions

View File

@ -384,6 +384,76 @@ The example program demonstrates:
- File upload with various options
- Error handling for all operations
## Testing
This project ships with both unit-style tests (no network required) and optional integration tests against a live PrivateBin server.
### Prerequisites
- CMake 3.10+
- A C++17 compiler
- Dependencies (Windows via vcpkg; Linux/macOS via system packages as documented above)
### Build and run tests (MSVC on Windows)
```cmd
REM From project root
scripts\build_windows.bat
REM Run tests
ctest -C Release --test-dir build --output-on-failure
```
### Build and run tests with clang-cl + LLVM coverage (Windows)
If you want code coverage reports using LLVM tools:
1) Install LLVM (contains llvm-profdata and llvm-cov)
- `winget install LLVM.LLVM` or use the official installer (ensure tools are in PATH)
2) Configure a separate clang-cl build with coverage enabled:
```cmd
cmake -S . -B build-clang -G "Visual Studio 17 2022" -A x64 -T ClangCL ^
-DCMAKE_TOOLCHAIN_FILE="%USERPROFILE%\vcpkg\scripts\buildsystems\vcpkg.cmake" ^
-DVCPKG_TARGET_TRIPLET=x64-windows ^
-DENABLE_LLVM_COVERAGE=ON ^
-DLLVM_PROFDATA="C:/Program Files/LLVM/bin/llvm-profdata.exe" ^
-DLLVM_COV="C:/Program Files/LLVM/bin/llvm-cov.exe"
cmake --build build-clang --config Release --target coverage_llvm
```
3) Coverage outputs
- Text report is printed in the build log
- HTML report is written to `build-clang/coverage/html/`
Notes:
- The coverage target runs the tests and then generates reports. It requires clang/clang-cl; MSVC alone is not supported for LLVM coverage instrumentation.
- On Windows `|` must be escaped in regex arguments; the CMake configuration already handles this.
### Integration tests against a live server
By default the integration test is disabled. Enable it by setting an environment variable before running the tests. The default server used is `https://privatebin.medisoftware.org`.
```cmd
REM Enable integration test and optionally override the server URL
set PRIVATEBIN_IT=1
set PRIVATEBIN_SERVER=https://privatebin.medisoftware.org/
ctest -C Release --test-dir build --output-on-failure
```
What it does:
- Creates a paste (three text formats: plaintext, syntax highlighting, markdown)
- Retrieves the paste and validates content
- Deletes the paste
- Uploads a small file and performs the same roundtrip
Safety & disclaimers:
- The referenced server is intended for testing and may be rate-limited or reset without notice. See its homepage for details: https://privatebin.medisoftware.org
- Do not upload sensitive data to public test instances.
## API Reference
### Functions