ww driver: align cstage flag-parse to ww twin; 949 pins parity

Lone -I/-L/-l/-o now error "ww <cmd>: -X needs an argument" (rc2),
matching selfhost main.ww. do_test rewritten to an -I-only loop that
loud-rejects -l/-L/-o/unknown instead of silently swallowing them.
949_driver_flagargs: table-driven, 10 rows, each run against both
twins asserting identical rc+stderr. (#15-team)
This commit is contained in:
2026-06-10 21:38:51 +09:00
parent 2661b4f2ea
commit 7470b1a5c3
3 changed files with 183 additions and 17 deletions

View File

@@ -235,6 +235,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_arch \
$(BIN)/test_e2e $(BIN)/test_ffi $(BIN)/test_dyn $(BIN)/test_stdlib \
$(BIN)/test_at_test $(BIN)/test_selfimport $(BIN)/test_missingpkg \
$(BIN)/test_driver_flagargs \
$(BIN)/test_let_global $(BIN)/test_def_neg_global \
$(BIN)/test_def_const_fold \
$(BIN)/test_int_cast_signed $(BIN)/test_dot_chain \
@@ -604,6 +605,10 @@ $(BIN)/test_missingpkg: test/wcc/949_missingpkg.c $(BIN)/ww $(BIN)/w6c \
$(BIN)/w6a $(BIN)/w6l $(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_driver_flagargs: test/wcc/949_driver_flagargs.c $(BIN)/ww \
$(BIN)/ww_ww | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_let_global: test/wcc/630_let_global.c $(BIN)/ww $(BIN)/w6c \
$(BIN)/w6a $(BIN)/w6l $(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<