샘플
Retrieve parsed options and flags via their canonical names from ArgResults when using aliases
sha256:1966c97c2d75ab9245ada1be26ad968056fdaaad28f126163a7f3bf75d7ed626
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Retrieve parsed options and flags via their canonical names from ArgResults when using aliases HOW
- 패키지
- args 2.7.0
- 환경
- dart
- 생성일
- 2026-08-17T02:03:07Z
흔히 이렇게 알고 있다
ArgResults allows retrieving parsed option and flag values using either their canonical name or any configured alias.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- ArgResults throws an ArgumentError when queried with an alias name via operator [] or wasParsed(), requiring all lookups to use the canonical option name regardless of how the option was supplied on the command line.
- assert parsing --dest assigns the value to canonical key results['target'] with wasParsed('target') true
- assert results['dest'] and results.wasParsed('dest') both throw ArgumentError for option alias
- assert parsing --no-simulate assigns false to canonical key results['dry-run'] with wasParsed('dry-run') true
- assert results['simulate'] and results.wasParsed('simulate') both throw ArgumentError for flag alias
- assert results['filter'] throws ArgumentError for multi-option alias
- assert results.options contains only canonical names and excludes configured aliases
파일
- NOTES.md
- csx.json
- pubspec.lock
- pubspec.yaml
- test/contract.dart
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- dart 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-16 · ed25519:d91480838ac982c9