<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slosh.git/tests/path_test.c, branch docs-new</title>
<subtitle>an opinionated terminal multiplexer in C with programmable pane chrome</subtitle>
<id>https://git.sl0p.foo/slosh.git/atom/tests/path_test.c?h=docs-new</id>
<link rel='self' href='https://git.sl0p.foo/slosh.git/atom/tests/path_test.c?h=docs-new'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/slosh.git/'/>
<updated>2026-08-28T13:10:24Z</updated>
<entry>
<title>path: unit tests for the two spellings</title>
<updated>2026-08-28T13:10:24Z</updated>
<author>
<name>Peter Geissler</name>
<email>peter@haxx.in</email>
</author>
<published>2026-08-28T13:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/slosh.git/commit/?id=1e84ca2a1e521ec3ffcb77f1a26e025e55aab90c'/>
<id>urn:sha1:1e84ca2a1e521ec3ffcb77f1a26e025e55aab90c</id>
<content type='text'>
The functions the last two commits fixed are only interesting on the
platform the suite does not run on, which is how they came to be wrong
in the first place. So the Windows cases are asserted under #ifdef and
the POSIX ones assert the opposite: that a drive letter is an ordinary
name here, that a backslash is an ordinary character, that neither rule
leaked across.

That second half is the one worth having. Both fixes are guarded, and a
guard is exactly the kind of thing a later edit removes without meaning
to -- `\` splitting a POSIX path would invent a directory out of a file
called `a\b`, and nothing else in the suite would notice.

Pure functions, so it joins the C unit tests rather than driving a
session. Run on the Windows box as well, cross-compiled: 28 checks
there, 20 here, the difference being the cases each platform has.
</content>
</entry>
</feed>
