From d10ff1250d0b95b4a7d21fe0592a0e07683c894b Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Tue, 16 Dec 2025 12:33:30 +0100 Subject: [PATCH 1/2] tests/tests.c: open text file in binary mode If the file is opened and read in text mode in Windows, the line endings will be translated and thus the stat() and fread() return different sizes. --- tests/tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.c b/tests/tests.c index eba7eae..4c78512 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -121,7 +121,7 @@ static const char *read_file_to_string(const char *file) buf = (char *)malloc(size + 1); TT_ASSERT_PTR_NOTNULL(buf); - fp = fopen(file, "rt"); + fp = fopen(file, "rb"); TT_ASSERT_PTR_NOTNULL(fp); r = fread(buf, 1, size, fp); From 6819e828395cd15ada0f6d23a25a158c821df3c9 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Mon, 15 Dec 2025 12:23:41 +0100 Subject: [PATCH 2/2] build.yaml: enable tests Execute tests for both CMake and autoconf build systems. --- .github/workflows/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f187344..35e1ed8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,10 @@ jobs: architecture: 'x64' # install dependencies - name: CMake build - run: cmake -B build && cmake --build build + run: | + cmake -B build + cmake --build build + ctest -V --test-dir build -C Debug - name: autoconf build if: ${{ matrix.os == 'ubuntu-latest' }} @@ -21,3 +24,4 @@ jobs: ./configure make clean make + make test