BadScript 2
Loading...
Searching...
No Matches
Issue418Tests.cs
Go to the documentation of this file.
1using System;
2using System.IO;
3using FluentAssertions;
4using Xunit;
6
8{
9 //issue#418, --version does not print a new line at the end cause trouble in Linux
10 public class Issue418Tests
11 {
12
13 [Fact]
15 {
16 // Fixture setup
17 var help = new StringWriter();
18 var sut = new Parser(config => config.HelpWriter = help);
19
20 // Exercize system
21 sut.ParseArguments<Simple_Options>(new[] { "--version" });
22 var result = help.ToString();
23 // Verify outcome
24 var lines = result.ToNotEmptyLines();
25 result.Length.Should().BeGreaterThan(0);
26 result.Should().EndWith(Environment.NewLine);
27 result.ToNotEmptyLines().Length.Should().Be(1);
28
29 // Teardown
30 }
31 }
32}
Provides methods to parse command line arguments.
Definition Parser.cs:21
void Explicit_version_request_generates_version_info_screen_with_eol()