mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-28 19:55:20 +08:00
test: add unit test for empty string
This commit is contained in:
@@ -3216,4 +3216,12 @@ mod tests {
|
||||
Err(e) => assert_eq!(e.err, ParseErrors::Lexer(LexerError::InvalidCharInt('g'))),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_empty_contract() {
|
||||
let (stmts, diagnostics, success) = parse_collect_diagnostics("");
|
||||
assert_eq!(success, true);
|
||||
assert_eq!(stmts.len(), 0);
|
||||
assert_eq!(diagnostics.len(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user