Skip to content

[Feature] Update litdoc file to take a file path#5

Merged
mwittie merged 1 commit into
mainfrom
chore/cmd-tests
Apr 30, 2026
Merged

[Feature] Update litdoc file to take a file path#5
mwittie merged 1 commit into
mainfrom
chore/cmd-tests

Conversation

@mwittie

@mwittie mwittie commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Describe your changes

  • Move the testscript TLD fixtures under cmd/testdata so they live with the CLI package tests.
  • Add cmd-level tests for the file command, including negative cases for missing args and missing path.
  • Move shared test harness (TestMain, runScript) into testscript_test.go.
  • Remove the root testscript harness and its dependency on make build.
  • Remove the block subcommand until an internal implementation exists.
  • Change litdoc file to accept a path argument instead of reading from stdin, and add a -w/--write flag for in-place rewrite via atomic temp+rename.

Notes for reviewers

  • litdoc file now takes a path argument (litdoc file <path>) rather than reading stdin. This is an intentional CLI change to support in-place rewriting with -w.
  • The -w flag writes atomically: temp file in the same directory, chmod to preserve mode, then os.Rename.

Checklist before requesting a review

If any of these checks are missing, please provide an explanation.

  • I have updated README files, if applicable.
  • This PR is small, otherwise explain why.

@mwittie mwittie changed the title Move TLD tests into cmd [Feature] Update litdoc file to take a file path Apr 30, 2026
@mwittie
mwittie merged commit 72435ac into main Apr 30, 2026
1 check passed
@mwittie
mwittie deleted the chore/cmd-tests branch April 30, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant