8 use lib $Bin, "$Bin/t";
15 name => 'link basic tests',
16 filter_elements => 'Org::Element::Link',
20 [[link2][description2]]
22 *can* contain markups]]
26 [[x][]] # empty description
27 [[x] [x]] # there should not be a space between link & description
29 y] [x]] # link cannot contain newline
32 test_after_parse => sub {
34 my $doc = $args{result};
35 my $elems = $args{elements};
36 is( $elems->[0]->link , "link1", "0: link");
37 ok(!$elems->[0]->description, "0: description");
38 is( $elems->[1]->link , "link2", "1: link");
39 is( $elems->[1]->description->as_string,
40 "description2", "1: description");
41 is( $elems->[2]->link , "link3", "2: link");
42 is( $elems->[2]->description->as_string,
43 "description\n*can* contain markups", "2: description");
47 # TODO: target cannot contain newline
48 # TODO: radio target cannot contain newline