From 0fefe35e27ec355c0f6111f5a8cb8852b4e0ef1e Mon Sep 17 00:00:00 2001 From: Brice Lambson Date: Mon, 7 Mar 2022 18:28:28 -0800 Subject: [PATCH] fixup! Scaffolding: Enable text templates Fix test failing on macOS --- .../TextTemplating/Internal/TextTemplatingServiceTest.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/EFCore.Design.Tests/TextTemplating/Internal/TextTemplatingServiceTest.cs b/test/EFCore.Design.Tests/TextTemplating/Internal/TextTemplatingServiceTest.cs index f3ac4286f06..69edd63eae3 100644 --- a/test/EFCore.Design.Tests/TextTemplating/Internal/TextTemplatingServiceTest.cs +++ b/test/EFCore.Design.Tests/TextTemplating/Internal/TextTemplatingServiceTest.cs @@ -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]