We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 625c32f commit 0c3e0c0Copy full SHA for 0c3e0c0
src/GitVersion.Core.Tests/Formatting/NumericFormatterTests.cs
@@ -35,4 +35,15 @@ public void TryFormat_UnsupportedFormat_ReturnsFalse()
35
result.ShouldBeFalse();
36
formatted.ShouldBeEmpty();
37
}
38
+
39
+ [TestCase(0, "{0:0000}", "0000")]
40
+ [TestCase(1, "{0:0000}", "0001")]
41
+ [TestCase(0, "{0:-0000;;''}", "")]
42
+ [TestCase(1, "{0:-0000;;''}", "-0001")]
43
+ public void ZeroFormatting(int value, string template, string expected)
44
+ {
45
+ var candidate = string.Format(template, value);
46
47
+ Assert.That(candidate, Is.EqualTo(expected));
48
+ }
49
0 commit comments