feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using Paca.Mobile.Core;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Mobile;
|
||||
|
||||
/// <summary>
|
||||
/// 모바일 문자열 인코딩 정제 및 유니코드 복원 무결성 게이트 (Gate 511 ~ Gate 515)
|
||||
/// - JS Evaluate 결과 JSON 유니코드 이스케이프(\uXXXX) 디코딩
|
||||
/// - URL 퍼센트 인코딩(%ED%95%9C%EA%B8%80) 사용자 가독 디코딩
|
||||
/// - HTML 엔티티(&, ", ', <, >) 복원
|
||||
/// </summary>
|
||||
public class MobileTextEncodingSanitizerGateTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("\"\\uB124\\uC774\\uBC84\"", "네이버")]
|
||||
[InlineData("\"\\uAD6C\\uAE00\"", "구글")]
|
||||
[InlineData("\\uC720\\uD29C\\uBE0C", "유튜브")]
|
||||
[InlineData("\"동영상 다운로더\"", "동영상 다운로더")]
|
||||
[InlineData("null", "")]
|
||||
[InlineData("", "")]
|
||||
[InlineData(null, "")]
|
||||
public void Gate511_JsStringDecoder_UnescapesUnicodeAndJsonQuotes(string? input, string expected)
|
||||
{
|
||||
var result = MobileTextEncodingSanitizer.CleanDecodedString(input);
|
||||
Assert.Equal(expected, result);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("https://www.google.com/search?q=%ED%85%8C%EC%8A%A4%ED%8A%B8", "https://www.google.com/search?q=테스트")]
|
||||
[InlineData("https://m.naver.com/%ED%95%9C%EA%B8%80%EA%B2%80%EC%83%89", "https://m.naver.com/한글검색")]
|
||||
[InlineData("paca://newtab", "paca://newtab")]
|
||||
[InlineData("", "")]
|
||||
[InlineData(null, "")]
|
||||
public void Gate512_FormatUrlForDisplay_DecodesPercentEncodingForHumanReadability(string? input, string expected)
|
||||
{
|
||||
var result = MobileTextEncodingSanitizer.FormatUrlForDisplay(input);
|
||||
Assert.Equal(expected, result);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(""안녕" & <세상>", "\"안녕\" & <세상>")]
|
||||
[InlineData("'PACA' & 브라우저", "'PACA' & 브라우저")]
|
||||
public void Gate513_HtmlEntityDecoding_RestoresEntities(string input, string expected)
|
||||
{
|
||||
var result = MobileTextEncodingSanitizer.CleanDecodedString(input);
|
||||
Assert.Equal(expected, result);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue