1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// use crate::{
// ast::{FmlValue::*, *},
// parser,
// };
// use chumsky::Parser;
// #[test]
// fn bold() {
// let fml = "*bold*";
// let exp = Content(vec![Section(vec![Bold(vec![Text("bold".to_owned())])])]);
// let p = crate::parser();
// assert_eq!(p.parse(fml).unwrap(), exp)
// }
// #[test]
// fn bold_ws() {
// let fml = "*\tbold *";
// let exp = Content(vec![Section(vec![Bold(vec![Text("\tbold ".to_owned())])])]);
// let p = crate::parser();
// assert_eq!(p.parse(fml).unwrap(), exp)
// }
// #[test]
// fn bold_esc() {
// let fml = r"\*bold*";
// let exp = Content(vec![Section(vec![Text("*bold*".to_owned())])]);
// let p = crate::parser();
// assert_eq!(p.parse(fml).unwrap(), exp)
// }
// #[test]
// fn bold_uses_nearest() {
// let fml = r"*no* nested *styling*";
// let exp = Content(vec![Section(vec![
// Bold(vec![Text("no".to_string())]),
// Text(" nested ".to_string()),
// Bold(vec![Text("styling".to_string())]),
// ])]);
// let p = crate::parser();
// assert_eq!(p.parse(fml).unwrap(), exp)
// }