CodeSampleX

サンプル

Ensure option-like arguments and the double-dash separator after a positional argument are treated as literal positional arguments when allowTrailingOptions is disabled

sha256:a8903858356386356972e088af4cc88ca064369aeb6c21d7e9db1fade9205dad

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Ensure option-like arguments and the double-dash separator after a positional argument are treated as literal positional arguments when allowTrailingOptions is disabled HOW
パッケージ
args 2.7.0
環境
dart
作成日
2026-08-17T02:02:58Z

よくある思い込み

When allowTrailingOptions is false, option-like arguments after the first positional argument still trigger validation, and the double-dash separator is consumed as a special token.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート