File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ and intfs acc_units acc = parse
3131 | ws hash ws (name as name) newline { intfs acc_units (add_intf acc name) lexbuf }
3232 | " Implementations imported:" newline { impls acc_units acc lexbuf }
3333 | " File " [^ '\n' ]+ newline { ocamlobjinfo (acc :: acc_units) empty lexbuf }
34+ | [^ '\n' ]* newline { intfs acc_units acc lexbuf }
3435 | _ | eof { acc :: acc_units }
3536and impls acc_units acc = parse
3637 | ws hash ws (name as name) newline { impls acc_units (add_impl acc name) lexbuf }
3738 | " File " [^ '\n' ]+ newline { ocamlobjinfo (acc :: acc_units) empty lexbuf }
39+ | [^ '\n' ]* newline { impls acc_units acc lexbuf }
3840 | _ | eof { acc :: acc_units }
3941
4042and archive acc = parse
Original file line number Diff line number Diff line change @@ -225,3 +225,33 @@ let%expect_test "parse_archive extracts unit names" =
225225 set { " bar" ; " foo" ; " helper" }
226226 | }]
227227;;
228+
229+ let % expect_test " regression test" =
230+ parse
231+ {fixture|
232+ File foo/ bar.cmo
233+ Unit name : Bar
234+ Interfaces imported :
235+ 03e897 aee435213573adf13c80fcb505 M1
236+ 863 a7f5288599b181f046f0f55277b0f M2
237+ Required globals :
238+ X
239+ Uses unsafe features : no
240+ Force link : no
241+ File foo / baz.cmo
242+ Unit name : Baz
243+ Interfaces imported :
244+ 1 b835c1e0367d04fd16979463a84a7cd M3
245+ 6 b06eead182e9e338552e756d414f9e8 M4
246+ Required globals :
247+ Y
248+ Uses unsafe features : no
249+ Force link : no
250+ |fixture};
251+ [% expect
252+ {|
253+ [ { impl = set {}; intf = set { " m1" ; " m2" } }
254+ ; { impl = set {}; intf = set { " m3" ; " m4" } }
255+ ]
256+ | }]
257+ ;;
You can’t perform that action at this time.
0 commit comments