Fix Linux build and tests

RegexEngine.cc uses std::uint32_t without including <cstdint>; libc++
pulls it in transitively, libstdc++ does not.

The in-place save for hard-linked files read the mode after opening
with O_TRUNC, but Linux clears setuid/setgid on that truncate, so the
bits were lost. Read the mode first, then ftruncate.

Two undo tests compared Buffer::AsString(), a debug label, instead of
the contents, so they only checked line counts; the random-edits test
also deleted from an empty buffer under libstdc++'s RNG sequence.
Compare ContentView() instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 12:33:28 -08:00
co-authored by Claude Opus 5.5
parent e4e9cee6c6
commit 4c8156ad9b
3 changed files with 22 additions and 14 deletions
+1
View File
@@ -1,5 +1,6 @@
#include "RegexEngine.h"
#include <cstdint>
#include <regex>
#include "RegexGuard.h"