Skip to content

Commit

Permalink
fixup! Scaffolding: Enable text templates
Browse files Browse the repository at this point in the history
Fix test failing on macOS
  • Loading branch information
bricelam committed Mar 8, 2022
1 parent 56adbe5 commit 0fefe35
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,20 @@ public void Directive_throws_when_processor_unknown()
[Fact]
public void ResolvePath_work()
{
using var dir = new TempDirectory();

var host = new TextTemplatingService(
new ServiceCollection()
.BuildServiceProvider());
var callback = new TextTemplatingCallback();

var result = host.ProcessTemplate(
@"T:\test.tt",
Path.Combine(dir, "test.tt"),
@"<#@ template hostSpecific=""true"" #><#= Host.ResolvePath(""data.json"") #>",
callback);

Assert.Empty(callback.Errors);
Assert.Equal(@"T:\data.json", result);
Assert.Equal(Path.Combine(dir, "data.json"), result);
}

[Fact]
Expand Down

0 comments on commit 0fefe35

Please sign in to comment.