Skip to content

Fix four cecb copy bugs and add regression coverage - #91

Merged
tlindner merged 2 commits into
nitros9project:mainfrom
tlindner:feature/cecb-copy-fixes
Oct 31, 2026
Merged

tlindner merged 2 commits into
nitros9project:mainfrom
tlindner:feature/cecb-copy-fixes

Conversation

@tlindner

Copy link
Copy Markdown
Member

Correct cassette file metadata and destination handling in cecb copy:

  • Map -1 to BASIC data file type 1 instead of machine-language type 2.
  • Construct output filenames when copying into native directories, handling paths with or without trailing slashes and rejecting truncated paths.
  • Convert line endings with -l only when crossing the native/CoCo boundary; preserve bytes for native-to-native and cassette-to-cassette copies.
  • Apply the binary default to tokenization (-t), allowing detokenization (-k) to mark its textual output as ASCII rather than binary.

Add a cecbcommandtest executable using the existing TinyTest framework. Cover BASIC data metadata and contents, binary extraction into native folders with both trailing-slash forms, same-type line-ending preservation, and detokenized BASIC text with its ASCII header flag. Register the suite in the Unix test target and ignore the generated executable.

Each new regression test was observed failing before its corresponding fix and passing afterward. Validation: make -C build/unix succeeds with all 68 tests passing; git diff --check passes.

Correct cassette file metadata and destination handling in cecb copy:

- Map -1 to BASIC data file type 1 instead of machine-language type 2.
- Construct output filenames when copying into native directories, handling
  paths with or without trailing slashes and rejecting truncated paths.
- Convert line endings with -l only when crossing the native/CoCo boundary;
  preserve bytes for native-to-native and cassette-to-cassette copies.
- Apply the binary default to tokenization (-t), allowing detokenization
  (-k) to mark its textual output as ASCII rather than binary.

Add a cecbcommandtest executable using the existing TinyTest framework.
Cover BASIC data metadata and contents, binary extraction into native
folders with both trailing-slash forms, same-type line-ending preservation,
and detokenized BASIC text with its ASCII header flag. Register the suite
in the Unix test target and ignore the generated executable.

Each new regression test was observed failing before its corresponding
fix and passing afterward. Validation: make -C build/unix succeeds with
all 68 tests passing; git diff --check passes.
@tlindner
tlindner merged commit 4c37c96 into nitros9project:main Oct 31, 2026
5 of 6 checks passed
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