From aab3da6a39d34de4ae7f1342437e9a7505f569eb Mon Sep 17 00:00:00 2001 From: Belden Lyman Date: Wed, 4 Dec 2024 18:21:46 -0800 Subject: [PATCH] Update tests The trailing `""` to wrap empty labels was a CSV error. This commit simply updates the test files to be properly encoded. It is a result of running the updated `ginkgo` binary from the previous commit across all of the _testdata files. ---- There was prior art within `outline/outline.go` which tried to properly enclose a comma-separated list of labels within double quotes. This resulted in CSV output with trailing `""` characters for tests that have no labels. A trailing `""` is incorrect for CSV formatting. There are two special characters within CSV formatting: " 0x22 DOUBLE QUOTE , 0x2c COMMA The mechanism to embed the field-separator 0x2c within a string is to enclose it within quotation marks. The mechanism to embed the quotation mark within a string is to use two quotation marks. i.e. the following string: // go code foo := "The dog looked at me and said, \"Bark, bark!\"" should be represented in CSV as Punchline,Laughs "The dog looked at me and said, ""Bark, bark!""",17 just as it would be represnted in JSON as { "punchline": "The dog looked at me and said, \"Bark, bark!\"", "laughs": 17 } --- ginkgo/outline/_testdata/alias_test.go.csv | 30 ++++++++-------- ginkgo/outline/_testdata/dsl_core_test.go.csv | 10 +++--- ginkgo/outline/_testdata/focused_test.go.csv | 30 ++++++++-------- ginkgo/outline/_testdata/labels_test.go.csv | 26 +++++++------- ginkgo/outline/_testdata/mixed_test.go.csv | 34 +++++++++---------- .../_testdata/nestedfocused_test.go.csv | 28 +++++++-------- ginkgo/outline/_testdata/nodot_test.go.csv | 30 ++++++++-------- ginkgo/outline/_testdata/normal_test.go.csv | 30 ++++++++-------- .../_testdata/pending_decorator_test.go.csv | 26 +++++++------- ginkgo/outline/_testdata/pending_test.go.csv | 30 ++++++++-------- 10 files changed, 137 insertions(+), 137 deletions(-) diff --git a/ginkgo/outline/_testdata/alias_test.go.csv b/ginkgo/outline/_testdata/alias_test.go.csv index 4e1fa3dbdf..13f44ecb22 100644 --- a/ginkgo/outline/_testdata/alias_test.go.csv +++ b/ginkgo/outline/_testdata/alias_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,NodotFixture,81,670,false,false,false,"" -Describe,normal,126,259,false,false,false,"" -It,normal,166,255,true,false,false,"" -By,normal,201,223,false,false,false,"" -By,normal,227,249,false,false,false,"" -Context,normal,262,342,false,false,false,"" -It,normal,301,338,true,false,false,"" -When,normal,345,422,false,false,false,"" -It,normal,381,418,true,false,false,"" -It,normal,425,461,true,false,false,"" -Specify,normal,464,505,true,false,false,"" -DescribeTable,normal,508,586,false,false,false,"" -Entry,normal,557,582,true,false,false,"" -DescribeTable,normal,589,667,false,false,false,"" -Entry,normal,638,663,true,false,false,"" +Describe,NodotFixture,81,670,false,false,false, +Describe,normal,126,259,false,false,false, +It,normal,166,255,true,false,false, +By,normal,201,223,false,false,false, +By,normal,227,249,false,false,false, +Context,normal,262,342,false,false,false, +It,normal,301,338,true,false,false, +When,normal,345,422,false,false,false, +It,normal,381,418,true,false,false, +It,normal,425,461,true,false,false, +Specify,normal,464,505,true,false,false, +DescribeTable,normal,508,586,false,false,false, +Entry,normal,557,582,true,false,false, +DescribeTable,normal,589,667,false,false,false, +Entry,normal,638,663,true,false,false, diff --git a/ginkgo/outline/_testdata/dsl_core_test.go.csv b/ginkgo/outline/_testdata/dsl_core_test.go.csv index 6b3db3a7ca..e72c45d3af 100644 --- a/ginkgo/outline/_testdata/dsl_core_test.go.csv +++ b/ginkgo/outline/_testdata/dsl_core_test.go.csv @@ -1,6 +1,6 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,DslCoreFixture,82,216,false,false,false,"" -Describe,dslcore,119,213,false,false,false,"" -It,dslcore,150,209,true,false,false,"" -By,step 1,176,188,false,false,false,"" -By,step 2,192,204,false,false,false,"" +Describe,DslCoreFixture,82,216,false,false,false, +Describe,dslcore,119,213,false,false,false, +It,dslcore,150,209,true,false,false, +By,step 1,176,188,false,false,false, +By,step 2,192,204,false,false,false, diff --git a/ginkgo/outline/_testdata/focused_test.go.csv b/ginkgo/outline/_testdata/focused_test.go.csv index 95d3e7f893..97cdc444ec 100644 --- a/ginkgo/outline/_testdata/focused_test.go.csv +++ b/ginkgo/outline/_testdata/focused_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,unfocused,73,529,false,false,false,"" -FDescribe,focused,105,202,false,true,false,"" -It,focused,137,198,true,true,false,"" -By,focused,163,176,false,true,false,"" -By,focused,180,193,false,true,false,"" -FContext,focused,205,268,false,true,false,"" -It,focused,236,264,true,true,false,"" -FWhen,focused,271,331,false,true,false,"" -It,focused,299,327,true,true,false,"" -FIt,focused,334,362,true,true,false,"" -FSpecify,focused,365,398,true,true,false,"" -FDescribeTable,focused,401,462,false,true,false,"" -Entry,focused,442,458,true,true,false,"" -DescribeTable,focused,465,526,false,false,false,"" -FEntry,focused,505,522,true,true,false,"" +Describe,unfocused,73,529,false,false,false, +FDescribe,focused,105,202,false,true,false, +It,focused,137,198,true,true,false, +By,focused,163,176,false,true,false, +By,focused,180,193,false,true,false, +FContext,focused,205,268,false,true,false, +It,focused,236,264,true,true,false, +FWhen,focused,271,331,false,true,false, +It,focused,299,327,true,true,false, +FIt,focused,334,362,true,true,false, +FSpecify,focused,365,398,true,true,false, +FDescribeTable,focused,401,462,false,true,false, +Entry,focused,442,458,true,true,false, +DescribeTable,focused,465,526,false,false,false, +FEntry,focused,505,522,true,true,false, diff --git a/ginkgo/outline/_testdata/labels_test.go.csv b/ginkgo/outline/_testdata/labels_test.go.csv index 0cb124ab14..56e81aeceb 100644 --- a/ginkgo/outline/_testdata/labels_test.go.csv +++ b/ginkgo/outline/_testdata/labels_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,NormalFixture,73,571,false,false,false,"" +Describe,NormalFixture,73,571,false,false,false, Describe,normal,109,228,false,false,false,"normal, serial" -It,normal,166,224,true,false,false,"" -By,step 1,191,203,false,false,false,"" -By,step 2,207,219,false,false,false,"" -Context,normal,231,323,false,false,false,"" +It,normal,166,224,true,false,false, +By,step 1,191,203,false,false,false, +By,step 2,207,219,false,false,false, +Context,normal,231,323,false,false,false, It,normal,260,319,true,false,false,"medium, slow" -When,normal,326,383,false,false,false,"" -It,normal,352,379,true,false,false,"" -It,normal,386,412,true,false,false,"" -Specify,normal,415,446,true,false,false,"" -DescribeTable,normal,449,507,false,false,false,"" -Entry,normal,488,503,true,false,false,"" -DescribeTable,normal,510,568,false,false,false,"" -Entry,normal,549,564,true,false,false,"" +When,normal,326,383,false,false,false, +It,normal,352,379,true,false,false, +It,normal,386,412,true,false,false, +Specify,normal,415,446,true,false,false, +DescribeTable,normal,449,507,false,false,false, +Entry,normal,488,503,true,false,false, +DescribeTable,normal,510,568,false,false,false, +Entry,normal,549,564,true,false,false, diff --git a/ginkgo/outline/_testdata/mixed_test.go.csv b/ginkgo/outline/_testdata/mixed_test.go.csv index d97f706823..02c5de18a0 100644 --- a/ginkgo/outline/_testdata/mixed_test.go.csv +++ b/ginkgo/outline/_testdata/mixed_test.go.csv @@ -1,18 +1,18 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -FDescribe,unfocused,73,584,false,false,false,"" -FContext,unfocused,106,205,false,false,false,"" -It,unfocused,139,169,true,false,false,"" -FIt,focused,172,201,true,true,false,"" -Context,unfocused,208,306,false,false,false,"" -FIt,focused,240,269,true,true,false,"" -It,unfocused,272,302,true,false,false,"" -FContext,focused,309,403,false,true,false,"" -It,focused,340,368,true,true,false,"" -It,focused,371,399,true,true,false,"" -PContext,unfocused,406,581,false,false,true,"" -FIt,unfocused,439,507,true,false,true,"" -By,unfocused,468,483,false,false,true,"" -By,unfocused,487,502,false,false,true,"" -It,unfocused,510,577,true,false,true,"" -By,unfocused,538,553,false,false,true,"" -By,unfocused,557,572,false,false,true,"" +FDescribe,unfocused,73,584,false,false,false, +FContext,unfocused,106,205,false,false,false, +It,unfocused,139,169,true,false,false, +FIt,focused,172,201,true,true,false, +Context,unfocused,208,306,false,false,false, +FIt,focused,240,269,true,true,false, +It,unfocused,272,302,true,false,false, +FContext,focused,309,403,false,true,false, +It,focused,340,368,true,true,false, +It,focused,371,399,true,true,false, +PContext,unfocused,406,581,false,false,true, +FIt,unfocused,439,507,true,false,true, +By,unfocused,468,483,false,false,true, +By,unfocused,487,502,false,false,true, +It,unfocused,510,577,true,false,true, +By,unfocused,538,553,false,false,true, +By,unfocused,557,572,false,false,true, diff --git a/ginkgo/outline/_testdata/nestedfocused_test.go.csv b/ginkgo/outline/_testdata/nestedfocused_test.go.csv index ec952319bf..d27c6761f5 100644 --- a/ginkgo/outline/_testdata/nestedfocused_test.go.csv +++ b/ginkgo/outline/_testdata/nestedfocused_test.go.csv @@ -1,15 +1,15 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -FDescribe,unfocused,73,476,false,false,false,"" -FContext,unfocused,106,275,false,false,false,"" -It,unfocused,139,206,true,false,false,"" -By,unfocused,167,182,false,false,false,"" -By,unfocused,186,201,false,false,false,"" -FIt,focused,209,271,true,true,false,"" -By,focused,236,249,false,true,false,"" -By,focused,253,266,false,true,false,"" -Context,unfocused,278,376,false,false,false,"" -FIt,focused,310,339,true,true,false,"" -It,unfocused,342,372,true,false,false,"" -FContext,focused,379,473,false,true,false,"" -It,focused,410,438,true,true,false,"" -It,focused,441,469,true,true,false,"" +FDescribe,unfocused,73,476,false,false,false, +FContext,unfocused,106,275,false,false,false, +It,unfocused,139,206,true,false,false, +By,unfocused,167,182,false,false,false, +By,unfocused,186,201,false,false,false, +FIt,focused,209,271,true,true,false, +By,focused,236,249,false,true,false, +By,focused,253,266,false,true,false, +Context,unfocused,278,376,false,false,false, +FIt,focused,310,339,true,true,false, +It,unfocused,342,372,true,false,false, +FContext,focused,379,473,false,true,false, +It,focused,410,438,true,true,false, +It,focused,441,469,true,true,false, diff --git a/ginkgo/outline/_testdata/nodot_test.go.csv b/ginkgo/outline/_testdata/nodot_test.go.csv index 9795d38f32..a0319883d7 100644 --- a/ginkgo/outline/_testdata/nodot_test.go.csv +++ b/ginkgo/outline/_testdata/nodot_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,NodotFixture,71,614,false,false,false,"" -Describe,normal,113,233,false,false,false,"" -It,normal,150,229,true,false,false,"" -By,normal,182,201,false,false,false,"" -By,normal,205,224,false,false,false,"" -Context,normal,236,310,false,false,false,"" -It,normal,272,306,true,false,false,"" -When,normal,313,384,false,false,false,"" -It,normal,346,380,true,false,false,"" -It,normal,387,420,true,false,false,"" -Specify,normal,423,461,true,false,false,"" -DescribeTable,normal,464,536,false,false,false,"" -Entry,normal,510,532,true,false,false,"" -DescribeTable,normal,539,611,false,false,false,"" -Entry,normal,585,607,true,false,false,"" +Describe,NodotFixture,71,614,false,false,false, +Describe,normal,113,233,false,false,false, +It,normal,150,229,true,false,false, +By,normal,182,201,false,false,false, +By,normal,205,224,false,false,false, +Context,normal,236,310,false,false,false, +It,normal,272,306,true,false,false, +When,normal,313,384,false,false,false, +It,normal,346,380,true,false,false, +It,normal,387,420,true,false,false, +Specify,normal,423,461,true,false,false, +DescribeTable,normal,464,536,false,false,false, +Entry,normal,510,532,true,false,false, +DescribeTable,normal,539,611,false,false,false, +Entry,normal,585,607,true,false,false, diff --git a/ginkgo/outline/_testdata/normal_test.go.csv b/ginkgo/outline/_testdata/normal_test.go.csv index 0e5878a576..52bd6c4aa8 100644 --- a/ginkgo/outline/_testdata/normal_test.go.csv +++ b/ginkgo/outline/_testdata/normal_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,NormalFixture,73,512,false,false,false,"" -Describe,normal,109,201,false,false,false,"" -It,normal,139,197,true,false,false,"" -By,step 1,164,176,false,false,false,"" -By,step 2,180,192,false,false,false,"" -Context,normal,204,264,false,false,false,"" -It,normal,233,260,true,false,false,"" -When,normal,267,324,false,false,false,"" -It,normal,293,320,true,false,false,"" -It,normal,327,353,true,false,false,"" -Specify,normal,356,387,true,false,false,"" -DescribeTable,normal,390,448,false,false,false,"" -Entry,normal,429,444,true,false,false,"" -DescribeTable,normal,451,509,false,false,false,"" -Entry,normal,490,505,true,false,false,"" +Describe,NormalFixture,73,512,false,false,false, +Describe,normal,109,201,false,false,false, +It,normal,139,197,true,false,false, +By,step 1,164,176,false,false,false, +By,step 2,180,192,false,false,false, +Context,normal,204,264,false,false,false, +It,normal,233,260,true,false,false, +When,normal,267,324,false,false,false, +It,normal,293,320,true,false,false, +It,normal,327,353,true,false,false, +Specify,normal,356,387,true,false,false, +DescribeTable,normal,390,448,false,false,false, +Entry,normal,429,444,true,false,false, +DescribeTable,normal,451,509,false,false,false, +Entry,normal,490,505,true,false,false, diff --git a/ginkgo/outline/_testdata/pending_decorator_test.go.csv b/ginkgo/outline/_testdata/pending_decorator_test.go.csv index 5fafb67fe6..10f1179c8e 100644 --- a/ginkgo/outline/_testdata/pending_decorator_test.go.csv +++ b/ginkgo/outline/_testdata/pending_decorator_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,NormalFixture,73,591,false,false,false,"" +Describe,NormalFixture,73,591,false,false,false, Describe,normal,109,237,false,false,true,"normal, serial" -It,normal,175,233,true,false,true,"" -By,step 1,200,212,false,false,true,"" -By,step 2,216,228,false,false,true,"" -Context,normal,240,332,false,false,false,"" +It,normal,175,233,true,false,true, +By,step 1,200,212,false,false,true, +By,step 2,216,228,false,false,true, +Context,normal,240,332,false,false,false, It,normal,269,328,true,false,false,"medium, slow" -When,normal,335,392,false,false,false,"" -It,normal,361,388,true,false,false,"" -It,normal,395,432,true,false,true,"" -Specify,normal,435,466,true,false,false,"" -DescribeTable,normal,469,527,false,false,false,"" -Entry,normal,508,523,true,false,false,"" -DescribeTable,normal,530,588,false,false,false,"" -Entry,normal,569,584,true,false,false,"" +When,normal,335,392,false,false,false, +It,normal,361,388,true,false,false, +It,normal,395,432,true,false,true, +Specify,normal,435,466,true,false,false, +DescribeTable,normal,469,527,false,false,false, +Entry,normal,508,523,true,false,false, +DescribeTable,normal,530,588,false,false,false, +Entry,normal,569,584,true,false,false, diff --git a/ginkgo/outline/_testdata/pending_test.go.csv b/ginkgo/outline/_testdata/pending_test.go.csv index 5991ed4939..df23f96ae0 100644 --- a/ginkgo/outline/_testdata/pending_test.go.csv +++ b/ginkgo/outline/_testdata/pending_test.go.csv @@ -1,16 +1,16 @@ Name,Text,Start,End,Spec,Focused,Pending,Labels -Describe,PendingFixture,73,534,false,false,false,"" -PDescribe,pending,110,207,false,false,true,"" -It,pending,142,203,true,false,true,"" -By,pending,168,181,false,false,true,"" -By,pending,185,198,false,false,true,"" -PContext,pending,210,273,false,false,true,"" -It,pending,241,269,true,false,true,"" -PWhen,pending,276,336,false,false,true,"" -It,pending,304,332,true,false,true,"" -PIt,pending,339,367,true,false,true,"" -PSpecify,pending,370,403,true,false,true,"" -PDescribeTable,pending,406,467,false,false,true,"" -Entry,pending,447,463,true,false,true,"" -DescribeTable,pending,470,531,false,false,false,"" -PEntry,pending,510,527,true,false,true,"" +Describe,PendingFixture,73,534,false,false,false, +PDescribe,pending,110,207,false,false,true, +It,pending,142,203,true,false,true, +By,pending,168,181,false,false,true, +By,pending,185,198,false,false,true, +PContext,pending,210,273,false,false,true, +It,pending,241,269,true,false,true, +PWhen,pending,276,336,false,false,true, +It,pending,304,332,true,false,true, +PIt,pending,339,367,true,false,true, +PSpecify,pending,370,403,true,false,true, +PDescribeTable,pending,406,467,false,false,true, +Entry,pending,447,463,true,false,true, +DescribeTable,pending,470,531,false,false,false, +PEntry,pending,510,527,true,false,true,