Skip to content

WIP: winx4-opt — reject invented pseudo-options in sort/mv/cp/join/tee/seq - #1409

Merged
caomengxuan666 merged 8 commits into
mainfrom
fix/winx4-opt-1355
Oct 27, 2026
Merged

caomengxuan666 merged 8 commits into
mainfrom
fix/winx4-opt-1355

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Fixes #1355

六命令各自自创的伪选项(GNU 无此选项却被静默接受)逐个删除,一 issue 六 commit:

  • sort:删 --check-silent 声明(-C 保留、--check=silent 合法形不动)d076b3c
  • mv:删 -I 声明与 parse_overwrite_mode 的 case 'I'(interactive_once 仅由 --interactive=once 到达)b84dda5
  • cp:-c/--context 改为仅 --context(-Z 保留)3cba6cb
  • join:删 -o 的长名 --output c0b1d7f
  • tee:删 -p 的长名 --diagnose 685b7db
  • seq:删 -t/--terminator 声明与 raw 扫描分支 05e66b2

每 commit 含该命令的 ctest 回归(断言 GNU rc + 诊断关键行 + 合法对照,测试名带 issue1355)。

验证(簇 mingw+Wine harness,GNU 9.4 为 oracle,证据在簇 REPORT final-repro.txt):基线六伪选项 9/9 被接受、合法对照 13/13 正常;修复后构建 [107/107] rc=0、22/22 PASS(六项按 GNU 形态拒绝:sort rc2、其余 rc1;合法选项全无损)。ctest 本体走仓内 MSVC CI,集成时须确认六个 unit 目标全绿。

集成注意:

# Conflicts:
#	tests/unit/seq/seq_unit_test.cpp
@caomengxuan666
caomengxuan666 marked this pull request as ready for review October 27, 2026 07:04
@caomengxuan666

Copy link
Copy Markdown
Member Author

Verified post-merge (origin/main @ 1854504): MSVC Debug build green; seq/sort/mv/cp/join/tee unit tests 221/221; full ctest — the 11 residuals are exactly the environment-bound baseline set (3x issue_1288 LongPathsEnabled=0, find.issue_1309_ls, 7x xargs CONIN$).

Merge note: the seq test conflict interleaved main's #1376 streaming pin into the branch's seq_separator_still_legal_issue1355 body; rebuilt so all 31 tests are byte-identical to one parent side. Main's two stale -t tests (seq_long_terminator_replaces_final_newline, seq_short_terminator_replaces_only_final_separator) auto-resolved to the branch's deletion, matching the option removal.

i18n: en drops the five invented pseudo-option keys and adds short-form keys join -o / sort -C / tee -p. Synced on winuxcmd-i18n sync/winx4-opt-i18n (zh-CN, VERSION 0.6.31).

# Conflicts:
#	src/commands/mv.cpp
#	src/commands/seq.cpp
#	tests/unit/cp/cp_unit_test.cpp
#	tests/unit/mv/mv_unit_test.cpp
@caomengxuan666
caomengxuan666 merged commit 3383e40 into main Oct 27, 2026
2 of 4 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/winx4-opt-1355 branch October 27, 2026 07:38
caomengxuan666 added a commit that referenced this pull request Oct 27, 2026
fix: repair conflict-marker pollution from the #1405/#1409 integration merges
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.

Several applets accept options that GNU does not have (invented options silently succeed)

1 participant