Files
2026-06-09 00:22:22 -05:00

40 lines
1.2 KiB
Markdown

# Sed++
This repository builds a native C++ executable named `sed` that is intended to
be a drop-in command-line replacement in environments where GNU sed
compatibility is the contract because red from uutils made me slightly upset.
The executable is deliberately split into small source files with heavy comments
around the sharp edges: script compilation, address ranges, regular-expression
substitution, hold space, NUL-delimited input, in-place editing, and GNU sed
extensions.
## Build
```sh
meson setup build
meson compile -C build
```
The binary is written to `build/sed/sed` so it matches the directory shape used
by GNU sed's own testsuite.
## Test against GNU sed 4.10
```sh
scripts/run-gnu-sed-tests.sh
```
The harness downloads `https://ftp.gnu.org/gnu/sed/sed-4.10.tar.xz`, configures
and builds the upstream test tree, copies this project's native C++ binary over
the upstream test binary, and runs the sed command tests. Meson also wires this
in as `gnu-sed-4.10` with a 240 second timeout:
```sh
meson test -C build gnu-sed-4.10
```
It intentionally skips GNU sed's `testsuite/help-version.sh` because Sed++ keeps
its own version string and license identity; that test asserts GNU branding
rather than sed command behavior.