()
| 645 | |
| 646 | #[test] |
| 647 | fn test_search_basic() { |
| 648 | let result = search("is {:d}", "Alice is 30 years old", 0, None, false).unwrap(); |
| 649 | match &result.fixed[0] { |
| 650 | ParseValue::Int(v) => assert_eq!(*v, 30), |
| 651 | other => panic!("Expected Int(30), got {:?}", other), |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | #[test] |
| 656 | fn test_findall_basic() { |