Skip to content

Commit e955b15

Browse files
Wandalenclaude
andcommitted
Add arg_list_issue test case
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 4507d8f commit e955b15

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

module/move/unilang/tests/arg_list_issue.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
//! Test module for verifying list argument parsing and validation functionality.
2+
//!
3+
//! This module tests the unilang framework's ability to handle list-type command arguments
4+
//! with validation rules, specifically ensuring that list arguments with minimum item
5+
//! constraints are properly parsed and validated during command execution.
6+
17
use unilang::prelude::*;
28
use unilang::ValidationRule;
39
use unilang_parser::{ Parser, UnilangParserOptions };
@@ -34,8 +40,8 @@ fn arg_list_test() -> Result< (), unilang::Error >
3440
(
3541
OutputData
3642
{
37-
content : "".to_string(),
38-
format : "".to_string(),
43+
content : String::new(),
44+
format : String::new(),
3945
}
4046
)
4147
}
@@ -44,7 +50,7 @@ fn arg_list_test() -> Result< (), unilang::Error >
4450

4551
let parser = Parser::new( UnilangParserOptions::default() );
4652

47-
let input = ".region.buy_castle 1 1";
53+
let input = ".region.buy_castle coord::1,1";
4854
let instructions = [ parser.parse_single_instruction( input ).map_err( unilang::Error::from )? ];
4955
let semantic_analyzer = unilang::semantic::SemanticAnalyzer::new( &instructions[ .. ], &registry );
5056
let commands = semantic_analyzer.analyze()?;

0 commit comments

Comments
 (0)