From 2f0a2e3cc8d431058a6c16966b5646fe76b42f87 Mon Sep 17 00:00:00 2001
From: yiabiten <iabiten@gmail.com>
Date: Thu, 4 Oct 2018 21:05:54 +0100
Subject: [PATCH] Fix locally failing tests with long lines

Do not assume Console width in contributors machines
(My situation: Win10 with console width=120)
---
 tests/CommandLine.Tests/Unit/ParserTests.cs        | 3 +++
 tests/CommandLine.Tests/Unit/Text/HelpTextTests.cs | 1 +
 2 files changed, 4 insertions(+)

diff --git a/tests/CommandLine.Tests/Unit/ParserTests.cs b/tests/CommandLine.Tests/Unit/ParserTests.cs
index 43b44e27..c63c34a5 100644
--- a/tests/CommandLine.Tests/Unit/ParserTests.cs
+++ b/tests/CommandLine.Tests/Unit/ParserTests.cs
@@ -488,6 +488,7 @@ public void Explicit_help_request_with_specific_verb_generates_help_screen()
         [Fact]
         public void Properly_formatted_help_screen_is_displayed_when_usage_is_defined_in_verb_scenario()
         {
+            Console.WindowWidth = 80;
             // Fixture setup
             var help = new StringWriter();
             var sut = new Parser(config => config.HelpWriter = help);
@@ -626,6 +627,7 @@ public void Parse_options_when_given_hidden_verb_with_hidden_option()
         [Fact]
         public void Specific_verb_help_screen_should_be_displayed_regardless_other_argument()
         {
+            Console.WindowWidth = 80;
             // Fixture setup
             var help = new StringWriter();
             var sut = new Parser(config => config.HelpWriter = help);
@@ -696,6 +698,7 @@ public void When_IgnoreUnknownArguments_is_set_valid_unknown_arguments_avoid_a_f
         [Fact]
         public void Properly_formatted_help_screen_excludes_help_as_unknown_option()
         {
+            Console.WindowWidth = 80;
             // Fixture setup
             var help = new StringWriter();
             var sut = new Parser(config => config.HelpWriter = help);
diff --git a/tests/CommandLine.Tests/Unit/Text/HelpTextTests.cs b/tests/CommandLine.Tests/Unit/Text/HelpTextTests.cs
index 90ca41b5..d15e3b1c 100644
--- a/tests/CommandLine.Tests/Unit/Text/HelpTextTests.cs
+++ b/tests/CommandLine.Tests/Unit/Text/HelpTextTests.cs
@@ -181,6 +181,7 @@ public void When_help_text_is_longer_than_width_it_will_wrap_around_as_if_in_a_c
         [Fact]
         public void When_help_text_has_hidden_option_it_should_not_be_added_to_help_text_output()
         {
+            Console.WindowWidth = 80;
             // Fixture setup
             // Exercize system 
             var sut = new HelpText(new HeadingInfo("CommandLine.Tests.dll", "1.9.4.131"));