Bug 259750 - [import-w3c-tests] invalid options/arguments don't cause an error
Summary: [import-w3c-tests] invalid options/arguments don't cause an error
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-02 15:02 PDT by Sam Sneddon [:gsnedders]
Modified: 2023-08-04 10:01 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2023-08-02 15:02:03 PDT
Running:

```
./Tools/Scripts/import-w3c-tests web-platform-tests/css/selectors --clear-dest-dir -a -t
```

Doesn't result in any error.

However, `--clear-dest-dir` isn't the name of an option—`--clean-dest-dir` is. I'd expect, in typical shell fashion, the unknown option to cause an error, not be treated as an argument.

We should probably also make:

```
./Tools/Scripts/import-w3c-tests nonsense/foo/bar
```

Fail, as we practically require the string to start with web-platform-tests.
Comment 1 Radar WebKit Bug Importer 2023-08-02 15:02:40 PDT
<rdar://problem/113293027>
Comment 2 Sam Sneddon [:gsnedders] 2023-08-02 15:48:48 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16331
Comment 3 EWS 2023-08-04 10:01:53 PDT
Committed 266587@main (b696c86a2c86): <https://commits.webkit.org/266587@main>

Reviewed commits have been landed. Closing PR #16331 and removing active labels.