()
| 139 | #[test] |
| 140 | #[should_panic] |
| 141 | fn test_cyclic() { |
| 142 | let temp_dir = tempfile::tempdir().unwrap(); |
| 143 | let file1_path = temp_dir.path().join("a.toml"); |
| 144 | let mut file1 = std::fs::File::create(&file1_path).unwrap(); |
| 145 | write!( |
| 146 | file1, |
| 147 | "{}", |
| 148 | r#" |
| 149 | include=["./a.toml"] |
| 150 | a=1 |
| 151 | b="string in a" |
| 152 | c=[1,2,3] |
| 153 | d=[4,5,6] |
| 154 | e={a=1, b=2}"# |
| 155 | ) |
| 156 | .unwrap(); |
| 157 | let _: Config = Parser::from_file(&file1_path, None).unwrap(); |
| 158 | } |
| 159 | |
| 160 | #[test] |
| 161 | fn test_template() -> Result<()> { |