Skip to content

Commit 8b6f289

Browse files
author
Florian Heinze
committed
TASK: fixed unit tests
1 parent 840d6f2 commit 8b6f289

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

utils/parse_dev_script_tasks_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,31 +46,28 @@ func TestParseDevScriptTasks_IgnoreCommentedOutTasks(t *testing.T) {
4646
func 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\nmultiline comment block - 2\nmultiline comment block - 3",
54+
Name: "multiline-comment-block",
55+
Title: "multiline comment block - 1",
56+
Description: "multiline comment block - 2\nmultiline 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\nmultiline comment block with empty lines - 2\n\nmultiline comment block with empty lines - 3",
61+
// TODO: remove trailing \n
62+
Description: "\nmultiline comment block with empty lines - 2\n\nmultiline 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\ncomment block end",
70+
Description: " keep leading-spaces used for indents\n\n\n\ncomment block end",
7471
},
7572
}
7673
actual := ParseDevScriptTasks("./fixtures/tasks_with_comments.sh")

0 commit comments

Comments
 (0)