test: 픽스처가 진짜 한글 NFD를 검증하도록 use utf8 추가 - #2
Merged
Conversation
make_fixture와 심볼릭 링크 픽스처가 use utf8 없이 한글 리터럴을 latin-1로 오인해 라틴 분해문자(e+◌̈ 등)의 NFD를 만들고 있었다. 변환 로직은 유니코드 일반 연산이라 테스트가 통과했지만, 도구의 핵심 목적인 한글 자모 결합 (초성+중성+종성 U+11xx → 완성형)을 실제로 검증하지 못했다. use utf8을 추가해 소스의 한글 리터럴을 진짜 한글 코드포인트로 인식 → make_fixture가 e1 84 87.. 자모 분리 NFD를 생성. test 15/15 유지.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경 — 데모 시연 중 발견
PR #1 머지 후 데모를
ls | xxd로 검증하다, 픽스처가 만드는 '보고서.hwp'의 바이트가65 cc 88 ...(=e+ combining diaeresis)로 나오는 것을 발견했습니다. 이는 한글이 아니라ë³´ê³ ì의 NFD —use utf8이 없어 소스의 한글 UTF-8 바이트를 latin-1로 오인한 결과입니다.test.sh의make_fixture(원본부터 존재)와 심볼릭 링크 픽스처가 모두 이 문제를 갖고 있어,테스트가 도구의 핵심 목적인 **한글 자모 결합(초성+중성+종성 U+11xx → 완성형)**을 실제로는
검증하지 못하고 있었습니다. 변환 로직이 유니코드 일반 연산이라 우연히 통과해 왔을 뿐입니다.
수정
make_fixture와 심볼릭 링크 픽스처 perl에use utf8;추가.✅ 검증
make_fixture의 '보고서.hwp' 바이트:e1 84 87 e1 85 a9 ...(진짜 한글 자모 NFD) ✅./test.sh15/15 통과 (이제 실제 한글로 검증)shellcheck(4파일) exit 0