New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some FsMessageTemplate tests failing #294
Comments
Hey @haf, I couldn't repro this.
|
I just noticed they're ignored... investigating further... |
OK, I found some gaps in the tests for alignment over in F# MtParserFull which I'll have to address over there first. It will probably result in a new file we can paket-reference here. However, the first issue here seems to be in match pt.align.direction with
| AlignDirection.Right -> formated.PadRight(pt.align.width, ' ')
| AlignDirection.Left -> formated.PadLeft(pt.align.width, ' ') When it's I've confirmed this interpretation with the following tests against Serilog and String.Format: void Main()
{
using (var logger = new LoggerConfiguration()
.WriteTo.Console(outputTemplate: "{Source}: {Message}{NewLine}")
.CreateLogger())
{
var log = logger.ForContext("Source", "Serilog");
log.Information("{p1,-10} | {p2,10}", "a", "a");
log.Information("{p1,-10} | {p2,10}", "aa", "aa");
log.Information("{p1,-10} | {p2,10}", "aaaa", "aaaa");
log = logger.ForContext("Source", "string.Format (C#)");
log.Information($"\"{"a",-10}\" | \"{"a",10}\"");
log.Information($"\"{"aa",-10}\" | \"{"aa",10}\"");
log.Information($"\"{"aaaa",-10}\" | \"{"aaaa",10}\"");
log = logger.ForContext("Source", "string.Format (BCL)");
log.Information(string.Format("{0,-10} | {1,10}", "a", "a"));
log.Information(string.Format("{0,-10} | {1,10}", "aa", "aa"));
log.Information(string.Format("{0,-10} | {1,10}", "aaaa", "aaaa"));
}
} |
I've fixed all but two of these tests. |
I rewrapped the tests properly in as Expecto tests:
And these are failing:
(examples)
Repro:
cd src/Logary.Tests && dotnet run --framework netcoreapp2.0
=>[16:03:52 INF] EXPECTO! 455 tests run in 00:00:02.6205660 for logary – 430 passed, 11 ignored, 14 failed, 0 errored. ( ರ Ĺ̯ ರೃ ) <Expecto>
Do you think you could have a look @adamchester ?
The text was updated successfully, but these errors were encountered: