From f74f1fba948c526271d383b1d80f086c99ecc15b Mon Sep 17 00:00:00 2001 From: whistyun Date: Thu, 27 Oct 2022 21:33:14 +0900 Subject: [PATCH 1/4] signing for strong name --- MdXaml.Html/MdXaml.Html.csproj | 10 ++++++++-- MdXaml.Plugins/MdXaml.Plugins.csproj | 8 +++++++- MdXaml.Svg/MdXaml.Svg.csproj | 8 +++++++- MdXaml/MdXaml.csproj | 11 ++++++++--- MdXaml/MdXamlMigfree.csproj | 8 +++++++- key.snk | Bin 0 -> 596 bytes ...enImages2_generatesExpectedResult.approved.txt | 2 +- ...enImages2_generatesExpectedResult.approved.txt | 2 +- 8 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 key.snk diff --git a/MdXaml.Html/MdXaml.Html.csproj b/MdXaml.Html/MdXaml.Html.csproj index 5663531..6da2436 100644 --- a/MdXaml.Html/MdXaml.Html.csproj +++ b/MdXaml.Html/MdXaml.Html.csproj @@ -2,7 +2,7 @@ netcoreapp3.0;net45;net5.0-windows MdXaml.Html - 1.16.0 + 1.16.1 whistyun Markdown XAML processor @@ -16,7 +16,13 @@ 9 enable - + + enable + true + true + ..\key.snk + + diff --git a/MdXaml.Plugins/MdXaml.Plugins.csproj b/MdXaml.Plugins/MdXaml.Plugins.csproj index 4ebd223..f4c8378 100644 --- a/MdXaml.Plugins/MdXaml.Plugins.csproj +++ b/MdXaml.Plugins/MdXaml.Plugins.csproj @@ -3,7 +3,7 @@ netcoreapp3.0;net45;net5.0-windows MdXaml.Plugins - 1.16.0 + 1.16.1 whistyun Markdown XAML processor @@ -17,4 +17,10 @@ 9 enable + + enable + true + true + ..\key.snk + diff --git a/MdXaml.Svg/MdXaml.Svg.csproj b/MdXaml.Svg/MdXaml.Svg.csproj index 15e8ec7..c5608e4 100644 --- a/MdXaml.Svg/MdXaml.Svg.csproj +++ b/MdXaml.Svg/MdXaml.Svg.csproj @@ -3,7 +3,7 @@ netcoreapp3.0;net45;net5.0-windows MdXaml.Svg - 1.16.0 + 1.16.1 whistyun Markdown XAML processor @@ -17,6 +17,12 @@ 9 enable + + enable + true + true + ..\key.snk + diff --git a/MdXaml/MdXaml.csproj b/MdXaml/MdXaml.csproj index 636d05e..22ec37c 100644 --- a/MdXaml/MdXaml.csproj +++ b/MdXaml/MdXaml.csproj @@ -4,7 +4,7 @@ netcoreapp3.0;net45;net5.0-windows true MdXaml - 1.16.0 + 1.16.1 Bevan Arps(original); whistyun Markdown XAML processor @@ -13,8 +13,13 @@ MIT Markdown WPF Xaml FlowDocument Debug;Release - 9 - enable + 9 + + + enable + true + true + ..\key.snk diff --git a/MdXaml/MdXamlMigfree.csproj b/MdXaml/MdXamlMigfree.csproj index 69e9c4e..717c180 100644 --- a/MdXaml/MdXamlMigfree.csproj +++ b/MdXaml/MdXamlMigfree.csproj @@ -4,7 +4,7 @@ netcoreapp3.0;net45;net5.0-windows true MdXaml_migfree - 1.16.0 + 1.16.1 Bevan Arps(original); whistyun Markdown XAML processor @@ -18,6 +18,12 @@ 9 enable + + enable + true + true + ..\key.snk + MIG_FREE diff --git a/key.snk b/key.snk new file mode 100644 index 0000000000000000000000000000000000000000..91fcdf5f3b6328aab61e8dbcfb1eab9d92049f8b GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097TsWw$>U6+T{jejzjYPF&I)(^eyb_3dL z6i9O~Iu-FMBZtgnx_B@pPg>-hX*g!uI9;Qi)^=pP`a0@xj2lDxq#IT%jqy&h7>v+k zwZbsnHyPj(B&7@d)w&e0;95E2KqEDgVarRIvF(nDrBZa%ecF>V+ik|7v7L!su9h5K7Qdm`%W4K#7Ej2MBjr{cngs6DX8!E0F^%8{i zU!b-;8=>xbx7X}5m_#o;DTvFoihz1Fb81C`@}Ozs_(u_4S`N z!BI05)N%9ig07??Ga7h0R@0{2aO^RynW!s!?hOV+<6oFZ$#XHsJ|`Q&01!cTzZ}*7Mr=gn z9@CbJ!621lO>t2QwE^@RdULWCNcZS@-XNHFKD1>vALw%*o@`A4rloJz9lhPYc;cg~ z#)aS{o-WTEFU*6%x@k;=eD^=np>Nri z-KJ|!;DV9H%$0=u9MW*DowZqIhsP%FlqtC@m?%$m4pzV%TI1%=O-k>G74-^s`*jkN i)sC}u`K~qVF(B7vOmyIA%1zh5Ctv9SX=(^~WflRc-yNm^ literal 0 HcmV?d00001 diff --git a/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt b/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt index 739c44c..54e2427 100644 --- a/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt +++ b/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt @@ -9,5 +9,5 @@ - A resource image . A local image . + A resource image . A local image . diff --git a/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt b/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt index 739c44c..54e2427 100644 --- a/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt +++ b/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt @@ -9,5 +9,5 @@ - A resource image . A local image . + A resource image . A local image . From 2b36a516cbd68a7ab17a346db9cb33e8f852accb Mon Sep 17 00:00:00 2001 From: whistyun Date: Thu, 27 Oct 2022 21:53:37 +0900 Subject: [PATCH 2/4] update action --- .github/workflows/build.yml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78de8dc..6504da6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,28 +1,39 @@ name: .NET on: - push: - branches: [ master ] pull_request: branches: [ master ] + workflow_dispatch: jobs: build: - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v2 with: submodules: 'true' - - name: Setup .NET 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.x - - name: Setup .NET 5.0 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x + - name: Install component on windows 2022 + shell: pwsh + run: | + Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" + $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" + $componentsToAdd = @( + "Microsoft.Net.Component.4.6.1.SDK" + ) + [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_} + $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') + $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden + if ($process.ExitCode -eq 0) + { + Write-Host "components have been successfully added" + } + else + { + Write-Host "components were not installed" + exit 1 + } - name: Clean run: dotnet clean - name: Restore From 098a9c7c51872baffb19ab2a1db45dbaebb35f56 Mon Sep 17 00:00:00 2001 From: whistyun Date: Fri, 28 Oct 2022 00:51:56 +0900 Subject: [PATCH 3/4] update test --- MdXaml.Html/MdXaml.Html.csproj | 2 - MdXaml.Plugins/MdXaml.Plugins.csproj | 2 - MdXaml.Svg/MdXaml.Svg.csproj | 2 - MdXaml/MdXaml.csproj | 3 +- MdXaml/MdXamlMigfree.csproj | 2 - .../MdXaml.Html.Test/ChangeOutputPathNamer.cs | 25 ++++++++ .../MdXaml.Html.Test/MdXaml.Html.Test.csproj | 2 +- .../Out/core/UnitTest.Button.approved.txt | 9 +++ .../Out/core/UnitTest.CodeBlock.approved.txt | 26 ++++++++ .../Out/core/UnitTest.InlineCode.approved.txt | 9 +++ .../Out/core/UnitTest.Input.approved.txt | 55 ++++++++++++++++ .../Out/core/UnitTest.List.approved.txt | 45 +++++++++++++ .../Out/core/UnitTest.Mixing.approved.txt | 64 +++++++++++++++++++ .../Out/core/UnitTest.Progres.approved.txt | 27 ++++++++ .../core/UnitTest.TypicalBlock.approved.txt | 39 +++++++++++ .../core/UnitTest.TypicalInline.approved.txt | 5 ++ .../Out/dotnet/UnitTest.Button.approved.txt | 9 +++ .../dotnet/UnitTest.CodeBlock.approved.txt | 26 ++++++++ .../dotnet/UnitTest.InlineCode.approved.txt | 9 +++ .../Out/dotnet/UnitTest.Input.approved.txt | 55 ++++++++++++++++ .../Out/dotnet/UnitTest.List.approved.txt | 45 +++++++++++++ .../Out/dotnet/UnitTest.Mixing.approved.txt | 64 +++++++++++++++++++ .../Out/dotnet/UnitTest.Progres.approved.txt | 27 ++++++++ .../dotnet/UnitTest.TypicalBlock.approved.txt | 39 +++++++++++ .../UnitTest.TypicalInline.approved.txt | 5 ++ .../framework/UnitTest.Button.approved.txt | 9 +++ .../framework/UnitTest.CodeBlock.approved.txt | 26 ++++++++ .../UnitTest.InlineCode.approved.txt | 9 +++ .../Out/framework/UnitTest.Input.approved.txt | 55 ++++++++++++++++ .../Out/framework/UnitTest.List.approved.txt | 45 +++++++++++++ .../framework/UnitTest.Mixing.approved.txt | 64 +++++++++++++++++++ .../framework/UnitTest.Progres.approved.txt | 27 ++++++++ .../UnitTest.TypicalBlock.approved.txt | 39 +++++++++++ .../UnitTest.TypicalInline.approved.txt | 5 ++ tests/MdXaml.Html.Test/UnitTest.cs | 7 +- tests/MdXaml.Html.Test/Utils.cs | 27 ++++++++ ...ages2_generatesExpectedResult.approved.txt | 2 +- ...ages2_generatesExpectedResult.approved.txt | 2 +- 38 files changed, 899 insertions(+), 14 deletions(-) create mode 100644 tests/MdXaml.Html.Test/ChangeOutputPathNamer.cs create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.Button.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.CodeBlock.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.InlineCode.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.Input.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.List.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.Mixing.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.Progres.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalBlock.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalInline.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Button.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.CodeBlock.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.InlineCode.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Input.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.List.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Mixing.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Progres.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalBlock.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalInline.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.Button.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.CodeBlock.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.InlineCode.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.Input.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.List.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.Mixing.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.Progres.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalBlock.approved.txt create mode 100644 tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalInline.approved.txt diff --git a/MdXaml.Html/MdXaml.Html.csproj b/MdXaml.Html/MdXaml.Html.csproj index 6da2436..8fe17ef 100644 --- a/MdXaml.Html/MdXaml.Html.csproj +++ b/MdXaml.Html/MdXaml.Html.csproj @@ -17,9 +17,7 @@ enable - enable true - true ..\key.snk diff --git a/MdXaml.Plugins/MdXaml.Plugins.csproj b/MdXaml.Plugins/MdXaml.Plugins.csproj index f4c8378..45b8818 100644 --- a/MdXaml.Plugins/MdXaml.Plugins.csproj +++ b/MdXaml.Plugins/MdXaml.Plugins.csproj @@ -18,9 +18,7 @@ enable - enable true - true ..\key.snk diff --git a/MdXaml.Svg/MdXaml.Svg.csproj b/MdXaml.Svg/MdXaml.Svg.csproj index c5608e4..7338017 100644 --- a/MdXaml.Svg/MdXaml.Svg.csproj +++ b/MdXaml.Svg/MdXaml.Svg.csproj @@ -18,9 +18,7 @@ enable - enable true - true ..\key.snk diff --git a/MdXaml/MdXaml.csproj b/MdXaml/MdXaml.csproj index 22ec37c..faeb9b7 100644 --- a/MdXaml/MdXaml.csproj +++ b/MdXaml/MdXaml.csproj @@ -14,11 +14,10 @@ Markdown WPF Xaml FlowDocument Debug;Release 9 + enable - enable true - true ..\key.snk diff --git a/MdXaml/MdXamlMigfree.csproj b/MdXaml/MdXamlMigfree.csproj index 717c180..07587f3 100644 --- a/MdXaml/MdXamlMigfree.csproj +++ b/MdXaml/MdXamlMigfree.csproj @@ -19,9 +19,7 @@ enable - enable true - true ..\key.snk diff --git a/tests/MdXaml.Html.Test/ChangeOutputPathNamer.cs b/tests/MdXaml.Html.Test/ChangeOutputPathNamer.cs new file mode 100644 index 0000000..3e80a96 --- /dev/null +++ b/tests/MdXaml.Html.Test/ChangeOutputPathNamer.cs @@ -0,0 +1,25 @@ +using ApprovalTests.Namers; +using System.IO; + +namespace MdXamlTest +{ + public class ChangeOutputPathNamer : UnitTestFrameworkNamer + { + private string dir; + + + public override string SourcePath + { + get + { + var basePath = base.SourcePath; + return Path.Combine(basePath, dir); + } + } + + public ChangeOutputPathNamer(string dir) + { + this.dir = dir; + } + } +} diff --git a/tests/MdXaml.Html.Test/MdXaml.Html.Test.csproj b/tests/MdXaml.Html.Test/MdXaml.Html.Test.csproj index 8b05313..9f3b3b6 100644 --- a/tests/MdXaml.Html.Test/MdXaml.Html.Test.csproj +++ b/tests/MdXaml.Html.Test/MdXaml.Html.Test.csproj @@ -1,7 +1,7 @@  - net462 + netcoreapp3.0;net462;net5.0-windows 9 enable diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.Button.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.Button.approved.txt new file mode 100644 index 0000000..268d6d1 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.Button.approved.txt @@ -0,0 +1,9 @@ + + + + + diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.CodeBlock.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.CodeBlock.approved.txt new file mode 100644 index 0000000..83595df --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.CodeBlock.approved.txt @@ -0,0 +1,26 @@ + + + + plain text +Sub Test() + Dim A As Long + Dim B As Integer +End Sub + + + + import java.lang.*; +public class Program { + public static void main(String[] args) { + System.out.println("Hello"); + } +} + + + + NEMUI +ONAKASUITA +SHINDOI + + + diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.InlineCode.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.InlineCode.approved.txt new file mode 100644 index 0000000..98deee0 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.InlineCode.approved.txt @@ -0,0 +1,9 @@ + + + An apple is an editable fruit produced by an apple tree. + + + + + Apple trees are caltivated wordwide. + diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.Input.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.Input.approved.txt new file mode 100644 index 0000000..c40481e --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.Input.approved.txt @@ -0,0 +1,55 @@ + + + + textbox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + asasdfasdfsadfasdfasd + +sd + +df + + + + + + afsadfasdfasd + +sd + +df + + diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.List.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.List.approved.txt new file mode 100644 index 0000000..7624ebf --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.List.approved.txt @@ -0,0 +1,45 @@ + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.Mixing.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.Mixing.approved.txt new file mode 100644 index 0000000..f8539b5 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.Mixing.approved.txt @@ -0,0 +1,64 @@ + + + Html Mixing + Html style + + + asdf asdf asdf + + + + + + + + Html style + + ![](https://img.shields.io/nuget/v/AssemblyInfoHelper.svg) asdf *asdf* asdf + + + + + + + + + + + + + + + + + + one + + + two + + + + + +
+ + + + + + + + + + + + + + + * one * two + + + +
+
diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.Progres.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.Progres.approved.txt new file mode 100644 index 0000000..0e6c65c --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.Progres.approved.txt @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalBlock.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalBlock.approved.txt new file mode 100644 index 0000000..0e7adf2 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalBlock.approved.txt @@ -0,0 +1,39 @@ + + + + Heading1 Title + + Sub Titile + H3_Title + H4_Title + H5_Title + H6_Title +
+ Written by Jon Doe.simewhere, someland, somecountry +
+
+ Article Element + description of this element... +
+
+ ASide Element + このタグに関する説明を書いてください・・・ +
+
+
+ ASide Element + このタグに関する説明を書いてください・・・ +
+ hm? +
+
+ Center Element + center tag center tag center tag... +
+ H6_Title + abcdefghi + jklmnopqr + stuvwxyz + abcdefghi + jklmnopqrstuvwxyz +
diff --git a/tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalInline.approved.txt b/tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalInline.approved.txt new file mode 100644 index 0000000..52c102b --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/core/UnitTest.TypicalInline.approved.txt @@ -0,0 +1,5 @@ + + + + asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Button.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Button.approved.txt new file mode 100644 index 0000000..268d6d1 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Button.approved.txt @@ -0,0 +1,9 @@ + + + + + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.CodeBlock.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.CodeBlock.approved.txt new file mode 100644 index 0000000..83595df --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.CodeBlock.approved.txt @@ -0,0 +1,26 @@ + + + + plain text +Sub Test() + Dim A As Long + Dim B As Integer +End Sub + + + + import java.lang.*; +public class Program { + public static void main(String[] args) { + System.out.println("Hello"); + } +} + + + + NEMUI +ONAKASUITA +SHINDOI + + + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.InlineCode.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.InlineCode.approved.txt new file mode 100644 index 0000000..98deee0 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.InlineCode.approved.txt @@ -0,0 +1,9 @@ + + + An apple is an editable fruit produced by an apple tree. + + + + + Apple trees are caltivated wordwide. + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Input.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Input.approved.txt new file mode 100644 index 0000000..c40481e --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Input.approved.txt @@ -0,0 +1,55 @@ + + + + textbox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + asasdfasdfsadfasdfasd + +sd + +df + + + + + + afsadfasdfasd + +sd + +df + + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.List.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.List.approved.txt new file mode 100644 index 0000000..7624ebf --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.List.approved.txt @@ -0,0 +1,45 @@ + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Mixing.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Mixing.approved.txt new file mode 100644 index 0000000..f8539b5 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Mixing.approved.txt @@ -0,0 +1,64 @@ + + + Html Mixing + Html style + + + asdf asdf asdf + + + + + + + + Html style + + ![](https://img.shields.io/nuget/v/AssemblyInfoHelper.svg) asdf *asdf* asdf + + + + + + + + + + + + + + + + + + one + + + two + + + + + +
+ + + + + + + + + + + + + + + * one * two + + + +
+
diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Progres.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Progres.approved.txt new file mode 100644 index 0000000..0e6c65c --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.Progres.approved.txt @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalBlock.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalBlock.approved.txt new file mode 100644 index 0000000..0e7adf2 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalBlock.approved.txt @@ -0,0 +1,39 @@ + + + + Heading1 Title + + Sub Titile + H3_Title + H4_Title + H5_Title + H6_Title +
+ Written by Jon Doe.simewhere, someland, somecountry +
+
+ Article Element + description of this element... +
+
+ ASide Element + このタグに関する説明を書いてください・・・ +
+
+
+ ASide Element + このタグに関する説明を書いてください・・・ +
+ hm? +
+
+ Center Element + center tag center tag center tag... +
+ H6_Title + abcdefghi + jklmnopqr + stuvwxyz + abcdefghi + jklmnopqrstuvwxyz +
diff --git a/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalInline.approved.txt b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalInline.approved.txt new file mode 100644 index 0000000..52c102b --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/dotnet/UnitTest.TypicalInline.approved.txt @@ -0,0 +1,5 @@ + + + + asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.Button.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Button.approved.txt new file mode 100644 index 0000000..268d6d1 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Button.approved.txt @@ -0,0 +1,9 @@ + + + + + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.CodeBlock.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.CodeBlock.approved.txt new file mode 100644 index 0000000..4b34b3d --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.CodeBlock.approved.txt @@ -0,0 +1,26 @@ + + + + plain text +Sub Test() + Dim A As Long + Dim B As Integer +End Sub + + + + import java.lang.*; +public class Program { + public static void main(String[] args) { + System.out.println("Hello"); + } +} + + + + NEMUI +ONAKASUITA +SHINDOI + + + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.InlineCode.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.InlineCode.approved.txt new file mode 100644 index 0000000..98deee0 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.InlineCode.approved.txt @@ -0,0 +1,9 @@ + + + An apple is an editable fruit produced by an apple tree. + + + + + Apple trees are caltivated wordwide. + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.Input.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Input.approved.txt new file mode 100644 index 0000000..c40481e --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Input.approved.txt @@ -0,0 +1,55 @@ + + + + textbox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + asasdfasdfsadfasdfasd + +sd + +df + + + + + + afsadfasdfasd + +sd + +df + + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.List.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.List.approved.txt new file mode 100644 index 0000000..7624ebf --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.List.approved.txt @@ -0,0 +1,45 @@ + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + + + + + + asdf fdsa jkl; ;lkj + + + 1234567 + + + + ねむい + + + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.Mixing.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Mixing.approved.txt new file mode 100644 index 0000000..f8539b5 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Mixing.approved.txt @@ -0,0 +1,64 @@ + + + Html Mixing + Html style + + + asdf asdf asdf + + + + + + + + Html style + + ![](https://img.shields.io/nuget/v/AssemblyInfoHelper.svg) asdf *asdf* asdf + + + + + + + + + + + + + + + + + + one + + + two + + + + + +
+ + + + + + + + + + + + + + + * one * two + + + +
+
diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.Progres.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Progres.approved.txt new file mode 100644 index 0000000..0e6c65c --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.Progres.approved.txt @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalBlock.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalBlock.approved.txt new file mode 100644 index 0000000..0e7adf2 --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalBlock.approved.txt @@ -0,0 +1,39 @@ + + + + Heading1 Title + + Sub Titile + H3_Title + H4_Title + H5_Title + H6_Title +
+ Written by Jon Doe.simewhere, someland, somecountry +
+
+ Article Element + description of this element... +
+
+ ASide Element + このタグに関する説明を書いてください・・・ +
+
+
+ ASide Element + このタグに関する説明を書いてください・・・ +
+ hm? +
+
+ Center Element + center tag center tag center tag... +
+ H6_Title + abcdefghi + jklmnopqr + stuvwxyz + abcdefghi + jklmnopqrstuvwxyz +
diff --git a/tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalInline.approved.txt b/tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalInline.approved.txt new file mode 100644 index 0000000..52c102b --- /dev/null +++ b/tests/MdXaml.Html.Test/Out/framework/UnitTest.TypicalInline.approved.txt @@ -0,0 +1,5 @@ + + + + asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf + diff --git a/tests/MdXaml.Html.Test/UnitTest.cs b/tests/MdXaml.Html.Test/UnitTest.cs index fa05556..4a59fa0 100644 --- a/tests/MdXaml.Html.Test/UnitTest.cs +++ b/tests/MdXaml.Html.Test/UnitTest.cs @@ -2,6 +2,7 @@ using ApprovalTests; using ApprovalTests.Reporters; using MdXaml.Plugins; +using MdXamlTest; using NUnit.Framework; using System.Linq; using System.Threading; @@ -18,7 +19,11 @@ public class UnitTest [Apartment(ApartmentState.STA)] public void Setup() { - var plugins = new MdXamlPlugins(); + var fwNm = Utils.GetRuntimeName(); + Approvals.RegisterDefaultNamerCreation(() => new ChangeOutputPathNamer("Out/" + fwNm)); + + + var plugins = new MdXamlPlugins(); plugins.Setups.Add(new HtmlPluginSetup()); manager = new() diff --git a/tests/MdXaml.Html.Test/Utils.cs b/tests/MdXaml.Html.Test/Utils.cs index bc0da64..e79cb24 100644 --- a/tests/MdXaml.Html.Test/Utils.cs +++ b/tests/MdXaml.Html.Test/Utils.cs @@ -3,6 +3,7 @@ using System.IO; using System.Reflection; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Windows.Markup; using System.Xml; @@ -36,5 +37,31 @@ public static string AsXaml(object instance) return writer.ToString(); } } + + public static string GetRuntimeName() + { + var description = RuntimeInformation.FrameworkDescription.ToLower(); + // ".NET Framework" + // ".NET Core"(for .NET Core 1.0 - 3.1) + // ".NET Native" + // ".NET"(for .NET 5.0 and later versions) + + if (description.Contains("framework")) + { + return "framework"; + } + + if (description.Contains("core")) + { + return "core"; + } + + if (description.Contains("native")) + { + return "native"; + } + + return "dotnet"; + } } } diff --git a/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt b/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt index 54e2427..739c44c 100644 --- a/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt +++ b/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt @@ -9,5 +9,5 @@ - A resource image . A local image . + A resource image . A local image . diff --git a/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt b/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt index 54e2427..739c44c 100644 --- a/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt +++ b/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt @@ -9,5 +9,5 @@ - A resource image . A local image . + A resource image . A local image . From 81e61a3410d2f1228992777a6c9e5db000000b7d Mon Sep 17 00:00:00 2001 From: whistyun Date: Fri, 28 Oct 2022 01:14:57 +0900 Subject: [PATCH 4/4] update test --- ....Transform_givenImages2_generatesExpectedResult.approved.txt | 2 +- ....Transform_givenImages2_generatesExpectedResult.approved.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt b/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt index 739c44c..54e2427 100644 --- a/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt +++ b/tests/MdXaml.Test/Out/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt @@ -9,5 +9,5 @@ - A resource image . A local image . + A resource image . A local image . diff --git a/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt b/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt index 739c44c..54e2427 100644 --- a/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt +++ b/tests/MdXaml.Test/OutMF/framework/Tests.Transform_givenImages2_generatesExpectedResult.approved.txt @@ -9,5 +9,5 @@ - A resource image . A local image . + A resource image . A local image .