@@ -46,31 +46,28 @@ func TestParseDevScriptTasks_IgnoreCommentedOutTasks(t *testing.T) {
4646func TestParseDevScriptTasks_TaskCommentsShouldBeParsed (t * testing.T ) {
4747 expected := []DevScriptTask {
4848 {
49- Name : "one-line-comment-block" ,
50- Title : "one line comment block - 1" ,
51- // TODO: fix trailing \n
52- Description : "one line comment block - 1" ,
49+ Name : "one-line-comment-block" ,
50+ Title : "one line comment block - 1" ,
51+ Description : "" ,
5352 },
5453 {
55- Name : "multiline-comment-block" ,
56- Title : "multiline comment block - 1" ,
57- // TODO: fix trailing \n
58- Description : "multiline comment block - 1\n multiline comment block - 2\n multiline comment block - 3" ,
54+ Name : "multiline-comment-block" ,
55+ Title : "multiline comment block - 1" ,
56+ Description : "multiline comment block - 2\n multiline comment block - 3" ,
5957 },
6058 {
6159 Name : "empty-lines-in-comment-block" ,
6260 Title : "multiline comment block with empty lines - 1" ,
63- // TODO: fix trailing \n
64- Description : "multiline comment block with empty lines - 1 \n \n multiline comment block with empty lines - 2\n \n multiline comment block with empty lines - 3" ,
61+ // TODO: remove trailing \n
62+ Description : "\n multiline comment block with empty lines - 2\n \n multiline comment block with empty lines - 3" ,
6563 },
6664 {
6765 Name : "leading-spaces-or-none-in-comment-block" ,
6866 Title : "leading space missing" ,
69- // TODO: fix trailing \n
7067 // remove # and one space always if present
7168 // keep \n but remove spaces if they are the only chars after #
7269 // also keep empty lines
73- Description : "leading space missing \n keep leading-spaces used for indents\n \n \n \n comment block end" ,
70+ Description : " keep leading-spaces used for indents\n \n \n \n comment block end" ,
7471 },
7572 }
7673 actual := ParseDevScriptTasks ("./fixtures/tasks_with_comments.sh" )
0 commit comments