From 080bc0bc615dd782282a1a5873df81cd0547d547 Mon Sep 17 00:00:00 2001 From: Joseph Kato Date: Fri, 22 Mar 2024 13:35:49 -0700 Subject: [PATCH] Fix tests --- Google/Headings.yml | 1 + features/rules.feature | 5 ++--- features/steps.rb | 4 ++-- fixtures/Headings/test.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Google/Headings.yml b/Google/Headings.yml index e34d001..c8d5be2 100644 --- a/Google/Headings.yml +++ b/Google/Headings.yml @@ -26,3 +26,4 @@ exceptions: - Visual - VS - Windows + - JSON diff --git a/features/rules.feature b/features/rules.feature index b1beb79..10b2796 100644 --- a/features/rules.feature +++ b/features/rules.feature @@ -39,7 +39,7 @@ Feature: Rules When I test "Contractions" Then the output should contain exactly: """ - test.md:3:1:Google.Contractions:Use 'it's' instead of 'It is'. + test.md:3:1:Google.Contractions:Use 'It's' instead of 'It is'. """ Scenario: Use of dashes @@ -87,11 +87,10 @@ Feature: Rules test.md:9:1:Google.OxfordComma:Use the Oxford comma in 'I dedicate this book to my parents, Ayn, Rand and'. test.md:11:46:Google.EmDash:Don't put a space before or after a dash. test.md:13:24:Google.EmDash:Don't put a space before or after a dash. - test.md:13:25:Google.EnDash:Use an em dash ('—') instead of '–'. test.md:13:27:Google.Exclamation:Don't use exclamation points in text. test.md:15:5:Google.Ellipses:In general, don't use an ellipsis. test.md:17:8:Google.Exclamation:Don't use exclamation points in text. - test.md:19:18:Google.LyHyphens:' publicly-' doesn't need a hyphen. + test.md:19:19:Google.LyHyphens:'publicly-available' doesn't need a hyphen. test.md:23:13:Google.Parens:Use parentheses judiciously. test.md:25:24:Google.Quotes:Commas and periods go inside quotation marks. test.md:27:34:Google.Semicolons:Use semicolons judiciously. diff --git a/features/steps.rb b/features/steps.rb index a9999d6..6f72e82 100644 --- a/features/steps.rb +++ b/features/steps.rb @@ -1,6 +1,6 @@ -cmd = 'vale --output=line --sort --normalize --relative' +cmd = 'vale --output=line --sort --normalize --relative --no-global' When(/^I test "(.*)"$/) do |rule| step %(I cd to "../../fixtures/#{rule}") step %(I run `#{cmd} .`) -end \ No newline at end of file +end diff --git a/fixtures/Headings/test.md b/fixtures/Headings/test.md index 1a32b74..1307db8 100644 --- a/fixtures/Headings/test.md +++ b/fixtures/Headings/test.md @@ -1,4 +1,4 @@ -# Test: modern documentation management +# Test: Modern documentation management # This is a heading @@ -12,4 +12,4 @@ # This vs. heading -# This is a heading: This is a subheading \ No newline at end of file +# This is a heading: This is a subheading