1166551Smarcel/* $NetBSD: opt_sc.c,v 1.8 2023/06/17 22:09:24 rillig Exp $ */ 2188723Smarcel 3166551Smarcel/* 4166551Smarcel * Tests for the options '-sc' and '-nsc'. 5166551Smarcel * 6166551Smarcel * The option '-sc' starts continuation lines of block comments with " * ". 7166551Smarcel * 8166551Smarcel * The option '-nsc' does not use asterisks for aligning the continuation 9166551Smarcel * lines of comments. 10166551Smarcel */ 11166551Smarcel 12166551Smarcel//indent input 13166551Smarcel/* comment 14166551Smarcelwithout 15166551Smarcelasterisks 16166551Smarcel*/ 17166551Smarcel//indent end 18166551Smarcel 19166551Smarcel//indent run -sc 20166551Smarcel/* 21166551Smarcel * comment without asterisks 22166551Smarcel */ 23166551Smarcel//indent end 24166551Smarcel 25166551Smarcel//indent run -nsc 26166551Smarcel/* 27166551Smarcelcomment without asterisks 28166551Smarcel */ 29166551Smarcel//indent end 30166551Smarcel 31166551Smarcel 32166551Smarcel//indent input 33166551Smarcel/* 34166551Smarcel** This comment style is used by Lua. 35166561Srodrigc*/ 36166551Smarcel//indent end 37166551Smarcel 38166551Smarcel//indent run -sc 39166551Smarcel/* 40166551Smarcel// $ XXX: The additional '*' is debatable. 41166551Smarcel * * This comment style is used by Lua. 42166551Smarcel */ 43188723Smarcel//indent end 44188723Smarcel 45191130Smarcel//indent run -nsc 46191130Smarcel/* 47191130Smarcel// $ This comment, as rewritten by indent, is not actually used by Lua. 48191130Smarcel * This comment style is used by Lua. 49191130Smarcel */ 50191130Smarcel//indent end 51191130Smarcel 52191130Smarcel 53191130Smarcel/* 54191130Smarcel * Comments that start with '*' or '-' do not get modified at all. 55188723Smarcel */ 56188723Smarcel//indent input 57188723Smarcel/** 58188723Smarcel * Javadoc, adopted by several other programming languages. 59188723Smarcel */ 60188723Smarcel//indent end 61207094Smarcel 62207094Smarcel//indent run-equals-input -sc 63207094Smarcel 64207094Smarcel//indent run-equals-input -nsc 65207094Smarcel 66207094Smarcel 67207094Smarcel/* 68214352Sae * Ensure that blank lines in comments are preserved. Multiple adjacent blank 69214352Sae * lines are preserved as well. 70214352Sae */ 71214352Sae//indent input 72214352Sae/* 73214352Saeparagraph 1 74188723Smarcel 75188723Smarcel 76166551Smarcelparagraph 2 77166551Smarcel*/ 78166551Smarcel//indent end 79166551Smarcel 80166551Smarcel//indent run -sc 81166551Smarcel/* 82166551Smarcel * paragraph 1 83178180Smarcel * 84178180Smarcel * 85178180Smarcel * paragraph 2 86178180Smarcel */ 87178180Smarcel//indent end 88178180Smarcel 89166551Smarcel//indent run -nsc 90166551Smarcel/* 91166551Smarcel// $ XXX: paragraph 1 is indented, paragraph 2 isn't. 92166551Smarcel paragraph 1 93166551Smarcel 94166551Smarcel 95166551Smarcelparagraph 2 96166551Smarcel */ 97166551Smarcel//indent end 98166551Smarcel