File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
src/tools/tidy/src/alphabetical Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -337,3 +337,62 @@ fn test_numeric_bad() {
337337 " ;
338338 bad ( lines, "bad:3: line not in alphabetical order" ) ;
339339}
340+
341+ #[ test]
342+ fn multiline ( ) {
343+ let lines = "\
344+ tidy-alphabetical-start
345+ (b,
346+ a);
347+ (
348+ b,
349+ a
350+ )
351+ tidy-alphabetical-end
352+ " ;
353+ good ( lines) ;
354+
355+ let lines = "\
356+ tidy-alphabetical-start
357+ (
358+ b,
359+ a
360+ )
361+ (b,
362+ a);
363+ tidy-alphabetical-end
364+ " ;
365+ good ( lines) ;
366+
367+ let lines = "\
368+ tidy-alphabetical-start
369+ (c,
370+ a);
371+ (
372+ b,
373+ a
374+ )
375+ tidy-alphabetical-end
376+ " ;
377+ bad ( lines, "bad:5: line not in alphabetical order" ) ;
378+
379+ let lines = "\
380+ tidy-alphabetical-start
381+ (
382+ c,
383+ a
384+ )
385+ (b,
386+ a);
387+ tidy-alphabetical-end
388+ " ;
389+ bad ( lines, "bad:6: line not in alphabetical order" ) ;
390+
391+ let lines = "\
392+ force_unwind_tables: Option<bool> = (None, parse_opt_bool, [TRACKED],
393+ 'force use of unwind tables'),
394+ incremental: Option<String> = (None, parse_opt_string, [UNTRACKED],
395+ 'enable incremental compilation'),
396+ " ;
397+ good ( lines) ;
398+ }
You can’t perform that action at this time.
0 commit comments