diff options
| author | user <user@clank> | 2026-08-18 21:26:00 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-18 21:26:00 +0200 |
| commit | b9e53cace4eb75263077df8623b011e66f5f2241 (patch) | |
| tree | 78e4dfb23f5d1881dc7bfe9e4c96fd543bdfab0b /tests/test_workspaces.py | |
| parent | sl0ppty: aim the top handle at the middle, and stop ruling through the row (diff) | |
| download | slosh-b9e53cace4eb75263077df8623b011e66f5f2241.tar.gz slosh-b9e53cace4eb75263077df8623b011e66f5f2241.tar.xz slosh-b9e53cace4eb75263077df8623b011e66f5f2241.zip | |
slosh: rename the project from sl0ppty
sl0p + pty was error-prone to type and the zero made it worse; slosh
(slop + sh) is one syllable, impossible to typo, and slosh.foo is ours.
Mechanical rename everywhere it appears: binary, env vars (SLOSH,
SLOSH_SESSION, SLOSH_BIN, SLOSH_CONFIG), socket dir (/tmp/slosh-<uid>,
$XDG_RUNTIME_DIR/slosh), config path (~/.config/slosh), header guards,
src/sl0ppty.h -> src/slosh.h, contrib/sl0ppty-dev -> contrib/slosh-dev,
the driving-slosh skill, docs and tests. The sl0ppi fork references and
the sl0p theme stay: one is history, the other is the brand.
The rename surfaced a latent bug in test_osc5577: the hello-reply
answer always appeared on screen twice (ECHOCTL echo plus cat -v), but
a seven-character implementation name happened to wrap the second copy
across the 60-column boundary, so counting substrings in wrapped text
found one and passed for the wrong reason. A five-character name moved
the wrap and exposed it. The loop guard itself is correct -- with echo
off before the request there is exactly one reply -- so the test now
counts on de-wrapped text and tolerates the pane's own echo.
Diffstat (limited to 'tests/test_workspaces.py')
| -rw-r--r-- | tests/test_workspaces.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/test_workspaces.py b/tests/test_workspaces.py index 825f7f7..3a0163d 100644 --- a/tests/test_workspaces.py +++ b/tests/test_workspaces.py @@ -1,6 +1,6 @@ """Workspaces: projects on disk, and the tabs they open as. -A *project* is a directory somebody works in -- one with a `sl0ppty.layout.kdl` +A *project* is a directory somebody works in -- one with a `slosh.layout.kdl` saying what it needs, or a `.git` and nothing said yet. A *workspace* is the tab it occupies here, and membership is that tab's `purpose` in the `project:` namespace, so there is no second answer to "what is this tab" and a dumped @@ -40,7 +40,7 @@ def roots(**projects): Values: layout text (a declared project), "git" (a `.git` and nothing else), or None (a directory that is neither, which must not be listed). """ - base = tempfile.mkdtemp(prefix="sl0ppty-ws-") + base = tempfile.mkdtemp(prefix="slosh-ws-") dev = os.path.join(base, "dev") for name, what in projects.items(): d = os.path.join(dev, *name.split("__")) @@ -48,7 +48,7 @@ def roots(**projects): if what == "git": os.makedirs(os.path.join(d, ".git"), exist_ok=True) elif what: - with open(os.path.join(d, "sl0ppty.layout.kdl"), "w") as f: + with open(os.path.join(d, "slosh.layout.kdl"), "w") as f: f.write(what) cfg = os.path.join(base, "config.kdl") with open(cfg, "w") as f: @@ -82,7 +82,7 @@ def test_a_project_is_a_layout_file_or_a_git(): check("a directory that is neither is not listed", "notes" not in got, str(got)) check( "the declared one names its file", - got["api"]["layout"].endswith("sl0ppty.layout.kdl"), + got["api"]["layout"].endswith("slosh.layout.kdl"), str(got["api"]), ) check( @@ -303,7 +303,7 @@ def test_saving_a_tab_writes_a_portable_layout_file(): saved = s.api("save-workspace") check( "it says where it wrote", - saved["path"] == os.path.join(dev, "web", "sl0ppty.layout.kdl"), + saved["path"] == os.path.join(dev, "web", "slosh.layout.kdl"), str(saved), ) check( @@ -554,7 +554,7 @@ def test_every_verb_has_a_bare_form(): wrote = bare1(s, "save-workspace") check( "save-workspace names the file it wrote", - "sl0ppty.layout.kdl" in wrote, + "slosh.layout.kdl" in wrote, repr(wrote), ) check( @@ -609,9 +609,7 @@ def test_the_picker_lists_projects_and_opens_one(): s.key("w") screen = s.snapshot().screen() check("it is titled as projects", "projects" in screen, screen) - check( - "a declared project shows its file", "sl0ppty.layout.kdl" in screen, screen - ) + check("a declared project shows its file", "slosh.layout.kdl" in screen, screen) check("and one without says so", "no layout" in screen, screen) s.send("web") @@ -651,11 +649,11 @@ def test_saving_from_the_keyboard_says_what_it_did(): s.api("open-workspace", name="web") s.key("W") screen = s.snapshot().screen() - check("the toast names the file", "sl0ppty.layout.kdl" in screen, screen) + check("the toast names the file", "slosh.layout.kdl" in screen, screen) check("and counts what it wrote", "1 pane" in screen, screen) check( "the file is there", - os.path.exists(os.path.join(dev, "web", "sl0ppty.layout.kdl")), + os.path.exists(os.path.join(dev, "web", "slosh.layout.kdl")), screen, ) |
