호스트의 읽기와 닫기와 쓰기는 다른 실행 오류입니다
2026년 11월 8일 채택 · 6.0.0 · 구현 중
문제
입출력이 모두 호스트에서 실패해도 읽을 데이터가 없었는지, 자원을 닫지 못했는지, 바이트를 전달하지 못했는지는 다릅니다. 호출자는 원인에 맞춰 문제를 찾아야 합니다.
결정
입력은 실행 단계의 TPZ4008, 닫기는 TPZ4009, 출력은 TPZ4010으로 구별합니다. 코드마다 어떤 종류의 작업에서 실패했는지 나타냅니다.
검토한 대안
- 하나의 호스트 입출력 코드에 원인만 다르게 넣는다. 코드만으로는 세 작업 중 어느 것에서 실패했는지 구별할 수 없습니다.
이유
실패한 작업을 진단의 정체성에서 바로 알 수 있습니다.
바뀐 규칙 Host write failures →
해결한 미정 항목 Host-write fault identity →
줄 출력은 단위 값을 돌려주고 호스트 쓰기 실패는 실행 오류입니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
출력을 받는 곳에서 쓰기를 거절할 수 있습니다. 출력 호출의 반환 타입을 바꿀지와 그 실패를 어떻게 볼지가 문제였습니다.
결정
std.io.writeLine의 서명은 단위 값을 유지합니다. 호스트가 쓰기에 실패하면 구조화된 실행 오류가 납니다.
예제
A successful write has a Unit result
check · checking · 검증 · 미실행
write-line-unit-result.tpzA successful write has a Unit result플레이그라운드 열기 →import std.iolet result: () = io.writeLine("hello")
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
A write result cannot use Result propagation
reject · checking · 검증 · 미실행
write-line-not-result.tpzA write result cannot use Result propagation플레이그라운드 열기 →import std.iofunction greeting() -> Result<(), string> { io.writeLine("hello")? Ok(())}
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 출력에서
Result를 돌려주게 한다. 기존 출력 호출이 다른 반환 타입을 처리해야 합니다. - 종료를 호스트가 정하게 둔다. 호스트 쓰기 실패의 결과를 토파즈에서 관측할 수 있게 정해야 합니다.
이유
기존 출력 코드는 같은 서명을 쓰고 실패는 언어에서 관측됩니다.
바뀐 규칙 Host write failures →writeLine contract →
해결한 미정 항목 Output boundaries and failures →
호스트 출력 오류는 실패한 출력 호출을 가리킵니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
출력 쓰기가 실패했을 때 일반 실행 오류와 같은 이름을 쓰면 출력 문제인지 구별하기 어렵습니다. 여러 출력 중 어떤 호출이 실패했는지도 알아야 합니다.
결정
writeLine의 호스트 쓰기 실패에 전용 실행 오류를 쓰고 진단 위치를 그 호출로 둡니다.
검토한 대안
- 다른 실행 오류의 적용 조건을 넓혀 같이 쓴다. 출력 쓰기 실패를 다른 연산의 문제와 구별하기 어렵습니다.
이유
실패한 작업과 호출을 진단에서 직접 확인할 수 있습니다.
바뀐 규칙 Host write failures →
일부 답한 미정 항목 Host-write fault identity →
길이와 키와 값 조회는 프로퍼티로 씁니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
컬렉션마다 길이나 키를 읽는 문법이 메서드와 프로퍼티 사이에서 달라질 수 있습니다. 같은 조회를 옮겨 쓸 때 문법을 다시 확인해야 합니다.
결정
컬렉션에서 length, keys, values 조회는 프로퍼티를 씁니다.
예제
Read the same properties on core collections
run · running · 검증 · 미실행
main.tpzRead the same properties on core collections플레이그라운드 열기 →import std.iolet array = [2, 3]let entries = map { "name": "Topaz" }let values = set { 2, 3 }io.writeLine("{array.length}:{entries.length}:{values.length}")io.writeLine(entries.keys[0])io.writeLine(entries.values[0])
기대 출력종료 코드 0
2:1:2
name
Topaz
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Read a byte sequence size
run · running · 검증 · 미실행
main.tpzRead a byte sequence sizeimport std.bytes { Bytes }import std.iolet bytes = Bytes.empty()let size: int = bytes.lengthio.writeLine("{size}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Read JSON object keys
run · running · 검증 · 미실행
main.tpzRead JSON object keysimport std.jsonimport std.testimport std.iolet object = test.assertOk(json.parse("\{\"name\":\"Topaz\"\}"))let array = test.assertOk(json.parse("[]"))let scalar = test.assertOk(json.parse("42"))let names: Option<Array<string>> = object.keystest.assertEq(test.assertSome(names)[0], "name")test.assertNone(array.keys)test.assertNone(scalar.keys)io.writeLine("JSON keys read")
기대 출력종료 코드 0
JSON keys read
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 메서드와 프로퍼티를 섞어 유지한다. 같은 조회를 컬렉션마다 다르게 적습니다.
이유
같은 종류의 정보는 같은 표기로 읽을 수 있습니다.
바뀐 규칙 Read collection sizes, keys, and values as properties →
빈 컬렉션은 length == 0으로 확인합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
길이를 읽는 코드와 비었는지 묻는 코드가 같은 상태를 두 방식으로 표현할 수 있었습니다. 컬렉션마다 추가 조회를 알 필요는 없습니다.
결정
빈 값은 length == 0으로 판정합니다. Bytes, Map, Set의 isEmpty는 없앱니다.
예제
Length zero identifies empty bytes, maps, and sets
run · runtime · 검증 · 미실행
main.tpzLength zero identifies empty bytes, maps, and setsimport std.iolet values: Map<string, int> = map {}let names: Set<string> = set {}io.writeLine("{("".encodeUtf8()).length == 0}")io.writeLine("{values.length == 0}")io.writeLine("{names.length == 0}")io.writeLine("{("ink".encodeUtf8()).length == 0}")
기대 출력종료 코드 0
true
true
true
false
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
isEmpty를 그대로 둔다. 길이가 0인지 보는 검사가 두 철자로 남습니다.
이유
비어 있는지 확인하는 기준을 길이에서 직접 읽을 수 있습니다.
바뀐 규칙 Read collection sizes, keys, and values as properties →
바이트 슬라이스의 경계를 벗어나면 실행 오류가 납니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
바이트 구간의 끝을 잘못 넘기면 잘린 결과를 정상 구간으로 오해할 수 있습니다. 인덱스 오류를 어느 자리에서 알릴지 정해야 합니다.
결정
슬라이스는 끝을 포함하지 않으며 0 <= start <= end <= length이어야 합니다. 경계가 틀리면 실행 단계의 TPZ4001입니다.
예제
Select empty and nonempty intervals
run · running · 검증 · 미실행
main.tpzSelect empty and nonempty intervals플레이그라운드 열기 →import std.iolet value = "abcd".encodeUtf8()io.writeLine(value.slice(0, 0).toHex())io.writeLine(value.slice(1, 3).toHex())io.writeLine(value.slice(4, 4).toHex())io.writeLine(value.toHex())
기대 출력종료 코드 0
6263
61626364
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject a negative slice start
run · running · 검증 · 미실행
main.tpzReject a negative slice start플레이그라운드 열기 →import std.bytes { Bytes }let value = "abcd".encodeUtf8()value.slice(-1, 2)
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject an inverted byte interval
run · running · 검증 · 미실행
main.tpzReject an inverted byte interval플레이그라운드 열기 →import std.bytes { Bytes }let value = "abcd".encodeUtf8()value.slice(3, 2)
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject an endpoint beyond the sequence
run · running · 검증 · 미실행
main.tpzReject an endpoint beyond the sequence플레이그라운드 열기 →import std.bytes { Bytes }let value = "abcd".encodeUtf8()value.slice(0, 5)
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 요청한 경계를 유효 범위로 잘라 맞춘다. 인덱스 오류가 다른 구간의 정상 결과로 바뀝니다.
이유
원하는 구간을 읽었는지 확인할 수 있습니다.
바뀐 규칙 Select explicit byte intervals →
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
바이트 하나를 여러 철자로 적을 수 있으면 받은 데이터가 약속한 형식인지 확인하기 어렵습니다. 접두사나 공백이 섞인 입력도 구별해야 합니다.
결정
각 바이트를 소문자 16진 숫자 두 자리로 읽습니다. 대문자, 접두사, 구분자와 공백은 거절합니다.
예제
Decode byte pairs and emit lowercase text
run · running · 검증 · 미실행
main.tpzDecode byte pairs and emit lowercase text플레이그라운드 열기 →import std.bytes { Bytes }import std.ioimport std.testio.writeLine(test.assertOk(Bytes.fromHex("")).toHex())io.writeLine(test.assertOk(Bytes.fromHex("000f80ff")).toHex())
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject malformed hexadecimal strings
run · running · 검증 · 미실행
main.tpzReject malformed hexadecimal strings플레이그라운드 열기 →import std.bytes { Bytes }import std.iofor text in (["0", "gg", "0x00", "00 11", "00"]) { match (Bytes.fromHex(text)) { case Err(_) => io.writeLine("invalid hex") case Ok(_) => io.writeLine("accepted") }}
기대 출력종료 코드 0
invalid hex
invalid hex
invalid hex
invalid hex
invalid hex
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력invalid hexinvalid hexinvalid hexinvalid hexinvalid hex
이 예제는 아직 실행하지 않았습니다.
Reject uppercase hexadecimal input
run · running · 검증 · 미실행
main.tpzReject uppercase hexadecimal input플레이그라운드 열기 →import std.bytes { Bytes }import std.iomatch (Bytes.fromHex("CAfe")) { case Err(_) => io.writeLine("uppercase rejected") case Ok(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
uppercase rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 대문자와 소문자를 모두 받는다. 같은 바이트에 서로 다른 철자를 허용합니다.
이유
16진 출력과 같은 형식으로 입력을 검사할 수 있습니다.
바뀐 규칙 Use a canonical hexadecimal spelling →
압축 해제는 스트림 하나를 끝까지 읽습니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
정상 압축 데이터 뒤에 다른 프레임이나 바이트가 붙을 수 있습니다. 앞부분만 읽으면 호출자가 나머지 입력을 놓칠 수 있습니다.
결정
- 형식이 정한 스트림, 프레임 또는 멤버 하나를 끝까지 소비합니다.
- 추가 프레임과 뒤따르는 바이트를 거절합니다.
예제
Reject truncated streams and trailing bytes
run · running · 검증 · 미실행
main.tpzReject truncated streams and trailing bytes플레이그라운드 열기 →import std.bytes { Bytes }import std.ioimport std.testfor hex in (["", "010100feff", "010000ffff00", "070000"]) { match (test.assertOk(Bytes.fromHex(hex)).deflateDecompress()) { case Err(_) => io.writeLine("invalid DEFLATE") case Ok(_) => io.writeLine("accepted") }}
기대 출력종료 코드 0
invalid DEFLATE
invalid DEFLATE
invalid DEFLATE
invalid DEFLATE
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력invalid DEFLATEinvalid DEFLATEinvalid DEFLATEinvalid DEFLATE
이 예제는 아직 실행하지 않았습니다.
Reject a truncated member and an invalid checksum
run · running · 검증 · 미실행
main.tpzReject a truncated member and an invalid checksum플레이그라운드 열기 →import std.bytes { Bytes }import std.ioimport std.testfor hex in (["1f8b0800", "1f8b08000000000000ff010500faff68656c6c6f87a6103605000000"]) { match (test.assertOk(Bytes.fromHex(hex)).gzipDecompress()) { case Err(_) => io.writeLine("invalid gzip") case Ok(_) => io.writeLine("accepted") }}
기대 출력종료 코드 0
invalid gzip
invalid gzip
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject missing block data and trailing bytes
run · running · 검증 · 미실행
main.tpzReject missing block data and trailing bytes플레이그라운드 열기 →import std.bytes { Bytes }import std.ioimport std.testfor hex in (["", "28b52ffd20052900006869", "28b52ffd200001000000"]) { match (test.assertOk(Bytes.fromHex(hex)).zstdDecompress()) { case Err(_) => io.writeLine("invalid Zstandard") case Ok(_) => io.writeLine("accepted") }}
기대 출력종료 코드 0
invalid Zstandard
invalid Zstandard
invalid Zstandard
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력invalid Zstandardinvalid Zstandardinvalid Zstandard
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 여러 프레임을 이어 읽거나 뒤쪽 바이트를 무시한다. 호출 한 번에 검증하는 입력의 경계가 바뀌거나 나머지가 확인되지 않습니다.
이유
압축 해제에 성공하면 입력 전체가 압축 단위 하나였음을 알 수 있습니다.
바뀐 규칙 Distinguish raw DEFLATE from zlib framing →Read and write complete gzip members →Use Zstandard frames and explicit effort levels →
압축 해제에 출력 바이트 한도를 지정할 수 있습니다
2026년 11월 16일 채택 · 6.0.0 · 확인 중
문제
작은 압축 입력도 풀면 출력이 크게 늘 수 있습니다. 처리할 수 있는 크기는 프로그램마다 다릅니다.
결정
- 압축 해제 함수는 선택 인자
maxBytes를 받습니다. 해제된 크기가 그 값을 넘으면 Err를 반환합니다. - 인자를 생략하면 크기 한도가 없습니다.
예제
Gzip decoding honors a caller-specified output limit
run · runtime · 검증 · 미실행
main.tpzGzip decoding honors a caller-specified output limitimport std.ioimport std.testlet encoded = test.assertOk("hello".encodeUtf8().gzipCompress())io.writeLine(test.assertOk(encoded.gzipDecompress(5)).toHex())match (encoded.gzipDecompress(4)) { case Err(_) => io.writeLine("limit exceeded") case Ok(_) => io.writeLine("accepted")}io.writeLine(test.assertOk(encoded.gzipDecompress()).toHex())
기대 출력종료 코드 0
68656c6c6f
limit exceeded
68656c6c6f
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력68656c6c6flimit exceeded68656c6c6f
이 예제는 아직 실행하지 않았습니다.
Deflate and Zstandard honor an output byte limit
run · runtime · 검증 · 미실행
main.tpzDeflate and Zstandard honor an output byte limitimport std.ioimport std.testlet data = "hello".encodeUtf8()let raw = test.assertOk(data.deflateCompress())let zstd = test.assertOk(data.zstdCompress())for outcome in ([raw.deflateDecompress(4), zstd.zstdDecompress(4)]) { let failed = match (outcome) { case Err(_) => true case Ok(_) => false } io.writeLine("{failed}")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 프로그램 전체에 같은 한도를 고정한다. 정상적인 큰 입력을 거절하거나 위험한 입력을 막기엔 한도가 너무 클 수 있습니다.
이유
입력의 출처와 프로그램이 감당할 크기에 맞춰 한도를 정할 수 있습니다.
바뀐 규칙 Read and write complete gzip members →Distinguish raw DEFLATE from zlib framing →Use Zstandard frames and explicit effort levels →
경로 연산은 정규화한 텍스트를 기준으로 합니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
한 이름으로 된 경로의 부모를 구하거나 끝에 점이 붙은 이름의 확장자를 바꿀 때가 있습니다. 자식 이름을 붙일 때도 어떤 문자열을 받을지 알아야 합니다.
결정
- 정규화한 경로의 구성 요소만 사용합니다. 구성 요소가 하나인 경로의 부모는
.입니다. - 끝에 점이 있으면 확장자는 빈 문자열입니다. 바꿀 확장자가 점으로 시작하면 거절합니다.
- 자식 이름은 검사한 뒤에 경로에 붙입니다.
예제
Reject invalid child text before joining
run · running · 검증 · 미실행
main.tpzReject invalid child text before joining플레이그라운드 열기 →import std.path { Path }import std.testimport std.iolet base = test.assertOk(Path.from("chapters"))for child in (["", "/outside", "C:/outside", "../../outside"]) { match (base.join(child)) { case Err(_) => io.writeLine("rejected") case Ok(_) => io.writeLine("accepted") }}io.writeLine(base.toString())
기대 출력종료 코드 0
rejected
rejected
rejected
rejected
chapters
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력rejectedrejectedrejectedrejectedchapters
이 예제는 아직 실행하지 않았습니다.
Inspect the final component and the relative root
run · running · 검증 · 미실행
main.tpzInspect the final component and the relative root플레이그라운드 열기 →import std.path { Path }import std.testimport std.iolet file = test.assertOk(Path.from("chapters/main.tpz"))io.writeLine(test.assertSome(file.parent()).toString())io.writeLine(test.assertSome(file.fileName()))io.writeLine(test.assertSome(file.extension()))let root = test.assertOk(Path.from("."))test.assertNone(root.parent())test.assertNone(root.fileName())test.assertNone(root.extension())io.writeLine(root.toString())
기대 출력종료 코드 0
chapters
main.tpz
tpz
.
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Keep the relative root as the parent of one component
run · running · 검증 · 미실행
main.tpzKeep the relative root as the parent of one component플레이그라운드 열기 →import std.path { Path }import std.testimport std.iolet file = test.assertOk(Path.from("main.tpz"))match (file.parent()) { case Some(parent) => io.writeLine(parent.toString()) case None() => io.writeLine("missing")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Distinguish an absent extension from an empty extension
run · running · 검증 · 미실행
main.tpzDistinguish an absent extension from an empty extension플레이그라운드 열기 →import std.path { Path }import std.testimport std.iofor name in (["README", ".env", ".env.local", "archive.tar.gz", "trailing."]) { let file = test.assertOk(Path.from(name)) match (file.extension()) { case Some(extension) => io.writeLine("present [{extension}]") case None() => io.writeLine("absent") }}
기대 출력종료 코드 0
absent
absent
present [local]
present [gz]
present []
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력absentabsentpresent [local]present [gz]present []
이 예제는 아직 실행하지 않았습니다.
Reject a second suffix spelling and a path without a file name
run · running · 검증 · 미실행
main.tpzReject a second suffix spelling and a path without a file name플레이그라운드 열기 →import std.path { Path }import std.testimport std.iolet file = test.assertOk(Path.from("chapter.txt"))for extension in ([".pdf", "pdf/extra", "pdf\\extra"]) { match (file.withExtension(extension)) { case Err(_) => io.writeLine("rejected") case Ok(_) => io.writeLine("accepted") }}let root = test.assertOk(Path.from("."))match (root.withExtension("pdf")) { case Err(_) => io.writeLine("root rejected") case Ok(_) => io.writeLine("root accepted")}
기대 출력종료 코드 0
rejected
rejected
rejected
root rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력rejectedrejectedrejectedroot rejected
이 예제는 아직 실행하지 않았습니다.
이유
파일 시스템을 조회하기 전에도 경로 구성 요소를 일정하게 다룰 수 있습니다.
바뀐 규칙 Inspect and transform normalized paths →
정규식은 ASCII 글자와 숫자만 이스케이프 이름으로 남깁니다
2026년 11월 16일 채택 · 6.0.0 · 구현 중
문제
백슬래시 뒤의 글자를 이스케이프 이름으로 읽는 범위를 유니코드 범주에 맡기면 문법이 버전에 따라 달라질 수 있습니다. 구두점이나 다른 글자를 그대로 쓰는 규칙도 필요합니다.
결정
- 백슬래시 뒤의 ASCII 글자와 숫자만 이스케이프 이름으로 예약합니다. 정의되지 않은 이름은 정규식 컴파일에서 오류입니다.
- 그 밖의 스칼라는 백슬래시 뒤에 와도 그 글자 그대로 읽습니다.
예제
ASCII escape names and a literal Korean character
run · runtime · 검증 · 미실행
main.tpzASCII escape names and a literal Korean character플레이그라운드 열기 →import std.ioimport std.regex { Regex }match (Regex.compile("\\가")) { case Ok(pattern) => io.writeLine("{pattern.isMatch("가")}") case Err(_) => io.writeLine("compile failed")}match (Regex.compile("\\q")) { case Ok(_) => io.writeLine("accepted undefined escape") case Err(_) => io.writeLine("undefined escape")}
기대 출력종료 코드 0
true
undefined escape
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 유니코드의 모든 글자와 숫자 범주를 예약한다. 유니코드 판의 분류가 달라지면 같은 패턴의 문법도 바뀝니다.
- ASCII가 아닌 이스케이프를 모두 거절한다. 판에는 매이지 않지만 같은 글자를 두 가지로 쓰는 길을 막는 것 말고 얻는 것이 없습니다.
이유
패턴에서 예약된 이스케이프 이름의 범위를 고정할 수 있습니다.
바뀐 규칙 Compile the Unicode regular expression language →
정규식 이름 캡처는 한 가지 표기를 씁니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
이름으로 캡처하려면 어떤 그룹 표기를 지원하는지 알아야 합니다. 대소문자를 구별하지 않는 일치도 같은 유니코드 규칙을 따라야 합니다.
결정
- Unicode 16.0 정규식 문법의 단순 대소문자 접기를 씁니다.
- 이름 캡처는
(?<name>pattern)으로 적습니다.
예제
Use one named capture spelling
run · running · 검증 · 미실행
main.tpzUse one named capture spelling플레이그라운드 열기 →import std.regex { Regex }import std.iofor text in (["(?<word>a)", "(?P<word>a)"]) { match (Regex.compile(text)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("invalid pattern") }}
기대 출력종료 코드 0
accepted
invalid pattern
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Apply scoped case, line, and dot flags
run · running · 검증 · 미실행
main.tpzApply scoped case, line, and dot flags플레이그라운드 열기 →import std.regex { Regex }import std.iofunction show(patternText: string, text: string) -> () { match (Regex.compile(patternText)) { case Ok(pattern) => io.writeLine("{pattern.isMatch(text)}") case Err(_) => io.writeLine("compile failed") }}show("(?i:ab)", "AB")show("(?m:^b$)", "a\nb\nc")show("(?s:a.b)", "a\nb")show("(?i:σ)", "ς")show("(?i:ss)", "ß")
기대 출력종료 코드 0
true
true
true
true
false
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Use Unicode digit, word, and whitespace classes
run · running · 검증 · 미실행
main.tpzUse Unicode digit, word, and whitespace classes플레이그라운드 열기 →import std.regex { Regex }import std.iofunction show(patternText: string, text: string) -> () { match (Regex.compile(patternText)) { case Ok(pattern) => io.writeLine("{pattern.isMatch(text)}") case Err(_) => io.writeLine("compile failed") }}show("^\\d+$", "١٢")show("^\\w+$", "한")show("^\\s$", " ")
기대 출력종료 코드 0
true
true
true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 이름 캡처의 표기를 여럿 받는다. 같은 이름을 붙이는 그룹을 여러 형태로 익혀야 합니다.
이유
캡처 이름을 언제나 같은 자리에서 찾을 수 있습니다.
바뀐 규칙 Compile the Unicode regular expression language →
정규식은 크기 한도를 넘으면 컴파일에서 거절합니다
2026년 11월 16일 채택 · 6.0.0 · 확인 중
문제
명령어 수가 같아도 캡처 칸 수에 따라 필요한 저장 공간이 다릅니다. 깊이 중첩된 그룹은 별도의 한도를 필요로 합니다.
결정
컴파일에서는 명령어 65536개, 프로그램 크기와 캡처 칸 수의 곱 2^22, 그룹 중첩 깊이 128을 한도로 둡니다. 하나라도 넘으면 Err입니다.
예제
A regex compiler rejects a group nesting depth of 129
run · runtime · 검증 · 미실행
main.tpzA regex compiler rejects a group nesting depth of 129import std.ioimport std.regex { Regex }let mut left = ""let mut right = ""for i in (0 ..< 129) { left = left + "(?:" right = right + ")"}match (Regex.compile(left + "a" + right)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("nesting rejected")}
기대 출력종료 코드 0
nesting rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 명령어 수만 센다. 캡처 칸이 늘어나는 경우와 깊게 중첩되는 경우를 그 수로 제한할 수 없습니다.
- 검색 중 단계 수로 멈춘다. 같은 패턴이 입력에 따라 성공하거나 멈춰 결과가 입력 크기에 매입니다.
이유
검색할 텍스트가 없어도 패턴 크기만으로 받아들일지 판단할 수 있습니다.
바뀐 규칙 Compile the Unicode regular expression language →
정규식 반복은 빈 일치를 한 번 더 수행하지 않습니다
2026년 11월 16일 채택 · 6.0.0 · 확인 중
문제
반복 몸체가 아무 문자도 소비하지 않고 맞을 수 있습니다. 같은 빈 일치를 한 번 더 허용하면 소비한 범위와 캡처 결과가 달라집니다.
결정
더 진행하지 않는 빈 반복을 추가하지 않습니다. (|a)*는 ab의 바이트 0부터 1까지 맞고, (a|)*를 b에 적용하면 1번 캡처는 None입니다.
예제
An empty repetition makes no extra capture
run · runtime · 검증 · 미실행
main.tpzAn empty repetition makes no extra capture플레이그라운드 열기 →import std.ioimport std.regex { Regex }match (Regex.compile("(|a)*")) { case Ok(pattern) => { match (pattern.find("ab")) { case Some(found) => io.writeLine("{found.start}:{found.end}") case None() => io.writeLine("no match") } } case Err(_) => io.writeLine("compile failed")}match (Regex.compile("(a|)*")) { case Ok(pattern) => { match (pattern.find("b")) { case Some(found) => { match (found.groups[1]) { case Some(group) => io.writeLine("captured={group}") case None() => io.writeLine("none") } } case None() => io.writeLine("no match") } } case Err(_) => io.writeLine("compile failed")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 빈 반복을 마지막에 한 번 더 수행한다. 빈 일치와 빈 캡처를 위한 별도 동작이 생깁니다.
이유
반복에서 실제로 소비한 부분과 캡처가 함께 읽힙니다.
바뀐 규칙 Search from the left and advance through nonoverlapping matches →
검색과 분할과 치환은 같은 일치 순서를 씁니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
같은 패턴을 검색과 치환에 썼는데 서로 다른 부분을 고르면 결과를 짐작하기 어렵습니다. 빈 문자열에 맞을 때는 다음 위치로 진행할 방법도 필요합니다.
결정
왼쪽에서 첫 일치를 선택해 겹치지 않는 순서로 이어 갑니다. 빈 일치도 진행 규칙을 따르며 검색, 분할, 치환이 같은 순서를 씁니다.
예제
Choose the first successful alternative at the leftmost position
run · running · 검증 · 미실행
main.tpzChoose the first successful alternative at the leftmost position플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("a|ab")) { case Ok(pattern) => { match (pattern.find("zab")) { case Some(found) => io.writeLine("{found.start}:{found.end}:{found.text}") case None() => io.writeLine("no match") } let present = pattern.isMatch("zab") let absent = pattern.isMatch("zzz") io.writeLine("{present}:{absent}") match (pattern.find("zzz")) { case None() => io.writeLine("none") case Some(_) => io.writeLine("present") } let matches = pattern.findAll("zzz") io.writeLine("{matches.length}") } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
1:2:a
true:false
none
0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Return nonoverlapping matches in input order
run · running · 검증 · 미실행
main.tpzReturn nonoverlapping matches in input order플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("aa")) { case Ok(pattern) => { for found in (pattern.findAll("aaaaa")) { io.writeLine("{found.start}:{found.end}:{found.text}") } } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
0:2:aa
2:4:aa
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Visit each boundary for an empty pattern and the empty input
run · running · 검증 · 미실행
main.tpzVisit each boundary for an empty pattern and the empty input플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("")) { case Ok(pattern) => { for found in (pattern.findAll("ab")) { io.writeLine("{found.start}:{found.end}") } io.writeLine("empty input") for found in (pattern.findAll("")) { io.writeLine("{found.start}:{found.end}") } } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
0:0
1:1
2:2
empty input
0:0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzRetain empty split fields without inserting captures플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("(,)")) { case Ok(pattern) => { for field in (pattern.split(",a,,b,")) { io.writeLine("[{field}]") } for field in (pattern.split("plain")) { io.writeLine("[{field}]") } } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
[]
[a]
[]
[b]
[]
[plain]
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzShare the adjacent-empty-match rule across transformations플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("a*")) { case Ok(pattern) => { for field in (pattern.split("ab")) { io.writeLine("[{field}]") } io.writeLine(pattern.replaceAll("ab", "-")) } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
[]
[b]
[]
-b-
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- API마다 다른 일치 순서를 정한다. 검색에서 본 부분과 치환이 실제로 바꾸는 부분이 달라질 수 있습니다.
이유
어느 동작을 써도 같은 패턴이 고르는 부분을 예측할 수 있습니다.
바뀐 규칙 Search from the left and advance through nonoverlapping matches →Split and replace using the shared match sequence →
정규식의 일치 위치는 UTF-8 바이트로 셉니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
다중 바이트 문자가 앞에 있으면 스칼라 번호와 바이트 위치가 다릅니다. 일치한 부분을 뽑으려면 결과 단위부터 알아야 합니다.
결정
Match.start와 Match.end는 UTF-8 바이트 위치입니다. 시작은 포함하고 끝은 제외합니다.
예제
Report UTF-8 byte offsets for non-ASCII matches
run · running · 검증 · 미실행
main.tpzReport UTF-8 byte offsets for non-ASCII matches플레이그라운드 열기 →import std.regex { Regex }import std.iofunction show(patternText: string, text: string) -> () { match (Regex.compile(patternText)) { case Ok(pattern) => { match (pattern.find(text)) { case Some(found) => io.writeLine("{found.start}:{found.end}:{found.text}") case None() => io.writeLine("no match") } } case Err(_) => io.writeLine("compile failed") }}show("한", "é한🙂")show("́", "éx")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Recover a match through the byte slice identified by its offsets
run · running · 검증 · 미실행
main.tpzRecover a match through the byte slice identified by its offsets플레이그라운드 열기 →import std.regex { Regex }import std.iolet text = "한x"match (Regex.compile("한")) { case Ok(pattern) => { match (pattern.find(text)) { case Some(found) => { let bytes = text.encodeUtf8().slice(found.start, found.end) match (bytes.decodeUtf8()) { case Ok(decoded) => io.writeLine(decoded) case Err(_) => io.writeLine("invalid UTF-8 slice") } } case None() => io.writeLine("no match") } } case Err(_) => io.writeLine("compile failed")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 유니코드 스칼라 번호로 위치를 준다. 바이트 구간으로 읽으려면 별도의 위치 변환이 필요합니다.
이유
인코딩된 입력에서 일치한 범위를 같은 위치로 가리킬 수 있습니다.
바뀐 규칙 Read match boundaries and capture snapshots →
정규식의 치환은 중괄호로 캡처를 가리킵니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
치환식에서 일치한 조각과 일반 달러 기호를 섞어 쓸 수 있습니다. 어떤 부분을 캡처 이름으로 읽는지 구분해야 합니다.
결정
- 0번 캡처는 일치한 전체 문자열입니다.
- 치환에서 캡처 참조는 중괄호로 감싸고 달러 문자 하나를 넣을 때는
$$를 씁니다.
예제
Keep capture zero and distinguish missing and empty captures
run · running · 검증 · 미실행
main.tpzKeep capture zero and distinguish missing and empty captures플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("(?<word>a)(b)?()")) { case Ok(pattern) => { match (pattern.find("a")) { case Some(found) => { io.writeLine("{found.groups.length}") for group in (found.groups) { match (group) { case Some(text) => io.writeLine("some={text}") case None() => io.writeLine("none") } } } case None() => io.writeLine("no match") } } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
4
some=a
some=a
none
some=
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzExpand braced capture references and a literal dollar플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("(?<word>[a-z]+)([0-9]+)?")) { case Ok(pattern) => { let replacement = "$\{word\}/$\{0\}/$\{2\}/$\{missing\}/$$" io.writeLine(pattern.replaceAll("a1 b", replacement)) io.writeLine(pattern.replaceAll("123", replacement)) } case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
a/a1/1//$ b/b///$
123
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzPreserve text that is not a braced reference플레이그라운드 열기 →import std.regex { Regex }import std.iomatch (Regex.compile("a")) { case Ok(pattern) => io.writeLine(pattern.replaceAll("a", "$word $1 $ $\{\} $\{bad-name\}")) case Err(_) => io.writeLine("compile failed")}
기대 출력종료 코드 0
$word $1 $ ${} ${bad-name}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력$word $1 $ ${} ${bad-name}
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 중괄호 없는
$1도 받는다. 같은 캡처를 가리키는 표기가 둘 생깁니다.
이유
일치 전체, 캡처, 일반 달러 문자를 치환식에서 구별할 수 있습니다.
바뀐 규칙 Read match boundaries and capture snapshots →Split and replace using the shared match sequence →
URL은 WHATWG 규칙을 따릅니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
같은 URL도 파서가 따르는 표준에 따라 다르게 정규화될 수 있습니다. 쿼리에 폼 인코딩이 쓰이는 경우도 파싱 규칙에 포함돼야 합니다.
결정
- 기준 URL 없이 WHATWG의 절대 URL 파싱과 직렬화를 따릅니다.
- 쿼리를 폼 인코딩 규칙으로 디코딩합니다.
예제
Normalize the scheme, host, port, and path
run · running · 검증 · 미실행
main.tpzNormalize the scheme, host, port, and path플레이그라운드 열기 →import std.url { URL }import std.iomatch (URL.parse("HTTPS://Example.COM:443/a/./b/../c?x=1#part")) { case Ok(value) => io.writeLine(value.toString()) case Err(_) => io.writeLine("parse failed")}
기대 출력종료 코드 0
https://example.com/a/c?x=1#part
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력https://example.com/a/c?x=1#part
이 예제는 아직 실행하지 않았습니다.
Handle invalid absolute URL text as data
run · running · 검증 · 미실행
main.tpzHandle invalid absolute URL text as data플레이그라운드 열기 →import std.url { URL }import std.iofor text in (["", "../guide", "1bad:x", "https://", "https://example.com:wrong"]) { match (URL.parse(text)) { case Err(message) => io.writeLine("{message != ""}") case Ok(_) => io.writeLine("accepted") }}
기대 출력종료 코드 0
true
true
true
true
true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Preserve serialized escapes and empty components through parsing
run · running · 검증 · 미실행
main.tpzPreserve serialized escapes and empty components through parsing플레이그라운드 열기 →import std.url { URL }import std.iofor text in (["https://example.com/a%2fb?x=%2b#p%2fq", "https://example.com/?#"]) { match (URL.parse(text)) { case Ok(value) => { io.writeLine(value.toString()) match (URL.parse(value.toString())) { case Ok(again) => io.writeLine(again.toString()) case Err(_) => io.writeLine("second parse failed") } } case Err(_) => io.writeLine("first parse failed") }}
기대 출력종료 코드 0
https://example.com/a%2fb?x=%2b#p%2fq
https://example.com/a%2fb?x=%2b#p%2fq
https://example.com/?#
https://example.com/?#
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력https://example.com/a%2fb?x=%2b#p%2fqhttps://example.com/a%2fb?x=%2b#p%2fqhttps://example.com/?#https://example.com/?#
이 예제는 아직 실행하지 않았습니다.
Decode repeated query fields and preserve their value order
run · running · 검증 · 미실행
main.tpzDecode repeated query fields and preserve their value order플레이그라운드 열기 →import std.url { URL }import std.iomatch (URL.parse("https://example.com/?q=a+b&q=%ED%95%9C&empty&x=a=b&=blank")) { case Ok(value) => { let fields = value.query() for name in (["q", "empty", "x", ""]) { match (fields.get(name)) { case Some(values) => { for item in (values) { io.writeLine("{name}={item}") } } case None() => io.writeLine("missing") } } } case Err(_) => io.writeLine("parse failed")}
기대 출력종료 코드 0
q=a b
q=한
empty=
x=a=b
=blank
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력q=a bq=한empty=x=a=b=blank
이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzKeep malformed percent escapes as query data플레이그라운드 열기 →import std.url { URL }import std.iofor text in (["https://example.com/?x=%", "https://example.com/?x=%GG"]) { match (URL.parse(text)) { case Ok(value) => { match (value.query().get("x")) { case Some(values) => io.writeLine(values[0]) case None() => io.writeLine("missing") } } case Err(_) => io.writeLine("parse failed") }}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- RFC 3986 규칙을 직접 구현한다. 그 선택은 WHATWG의 URL 처리 및 폼 쿼리 계약과 달라집니다.
이유
절대 URL과 폼 쿼리에 적용할 규칙을 한 계약에서 찾을 수 있습니다.
바뀐 규칙 Parse and serialize absolute URLs →Decode query fields into an independent map →
국제화 도메인 이름은 Unicode 16.0.0을 기준으로 처리합니다
2026년 11월 16일 채택 · 6.0.0 · 확인 중
문제
실행 환경에 따라 설치된 유니코드 판이 다를 수 있습니다. 그 표에 기대면 같은 이름을 다르게 분류할 수 있습니다.
결정
- 국제화 도메인의 UTS 46 처리는 Unicode 16.0.0 표를 씁니다.
- 어휘 규칙, 정규화, 정규 표현식 속성도 동일한 16.0.0 원자료를 사용합니다.
예제
URL parsing folds the Cyrillic letter introduced in Unicode 16
run · runtime · 검증 · 미실행
main.tpzURL parsing folds the Cyrillic letter introduced in Unicode 16플레이그라운드 열기 →import std.ioimport std.testimport std.url { URL }for input in (["https://.example", "https://.example"]) { let url = test.assertOk(URL.parse(input)) io.writeLine(test.assertSome(url.host()))}
기대 출력종료 코드 0
xn--d4f.example
xn--d4f.example
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력xn--d4f.examplexn--d4f.example
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 실행 환경마다 최신 표를 쓰거나 도메인 이름에만 다른 판을 쓴다. 환경에 따라 결과가 달라지거나 문자 하나가 URL 처리와 이름 검사에서 다르게 분류됩니다.
이유
실행 환경이 바뀌어도 국제화 도메인 처리의 유니코드 판이 일정합니다.
바뀐 규칙 Read serialized URL components and their absence →
날짜는 서기 1년부터 9999년까지입니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
연도가 0인 날짜를 받는지에 따라 저장하거나 주고받는 범위가 달라집니다. 날짜에 일을 더한 결과가 범위를 넘어갈 수도 있습니다.
결정
- 전향적 그레고리력
0001-01-01부터 9999-12-31까지를 받습니다. 연도 0은 거절합니다. - 일수 연산이 이 범위를 넘어가면 실행 단계의 TPZ4004입니다.
예제
Reject year zero during component construction
run · running · 검증 · 미실행
main.tpzReject year zero during component construction플레이그라운드 열기 →import std.date { Date }import std.iomatch (Date.fromYmd(0, 1, 1)) { case Err(_) => io.writeLine("year zero rejected") case Ok(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
year zero rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject year zero in ISO text
run · running · 검증 · 미실행
main.tpzReject year zero in ISO text플레이그라운드 열기 →import std.date { Date }import std.iomatch (Date.parseIso("0000-01-01")) { case Err(_) => io.writeLine("year zero rejected") case Ok(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
year zero rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Cross leap days, years, and the full supported interval
run · running · 검증 · 미실행
main.tpzCross leap days, years, and the full supported interval플레이그라운드 열기 →import std.date { Date }import std.testimport std.iolet leap = test.assertOk(Date.fromYmd(2000, 2, 28))io.writeLine(leap.addDays(1).toIso())io.writeLine(leap.addDays(2).toIso())io.writeLine(leap.toIso())io.writeLine(test.assertOk(Date.fromYmd(1900, 2, 28)).addDays(1).toIso())io.writeLine(test.assertOk(Date.fromYmd(1582, 10, 4)).addDays(1).toIso())io.writeLine(test.assertOk(Date.fromYmd(2000, 1, 1)).addDays(-1).toIso())io.writeLine(leap.addDays(0).toIso())io.writeLine(test.assertOk(Date.fromYmd(1, 1, 1)).addDays(3652058).toIso())io.writeLine(test.assertOk(Date.fromYmd(9999, 12, 31)).addDays(-3652058).toIso())
기대 출력종료 코드 0
2000-02-29
2000-03-01
2000-02-28
1900-03-01
1582-10-05
1999-12-31
2000-02-28
9999-12-31
0001-01-01
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력2000-02-292000-03-012000-02-281900-03-011582-10-051999-12-312000-02-289999-12-310001-01-01
이 예제는 아직 실행하지 않았습니다.
Reject the day after the final supported date
run · running · 검증 · 미실행
main.tpzReject the day after the final supported date플레이그라운드 열기 →import std.date { Date }import std.testimport std.iolet date = test.assertOk(Date.fromYmd(9999, 12, 31))date.addDays(1)io.writeLine("after")
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject the day before the first supported date
run · running · 검증 · 미실행
main.tpzReject the day before the first supported date플레이그라운드 열기 →import std.date { Date }import std.testimport std.iolet date = test.assertOk(Date.fromYmd(1, 1, 1))date.addDays(-1)io.writeLine("after")
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 연도 0을 계속 허용한다. 날짜 입력의 하한이 달라집니다.
이유
날짜를 계산하기 전에 어떤 날을 표현할 수 있는지 알 수 있습니다.
바뀐 규칙 Construct valid Gregorian civil dates →Add whole calendar days within the civil date range →
큰 정수의 텍스트는 진법을 정하고 소문자로 씁니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
공백이나 대문자를 섞어도 같은 수로 읽는다면 입력이 의도한 형식인지 알기 어렵습니다. 접두사를 붙여 자동으로 진법을 고를 수도 있었습니다.
결정
- 2부터 36까지의 진법과 소문자 ASCII 숫자를 씁니다. 앞에는 음수 부호 하나를 붙일 수 있습니다.
- 공백은 지우지 않고 접두사로 진법을 추론하지 않습니다.
예제
Parse and format exact integers in explicit radices
run · running · 검증 · 미실행
main.tpzParse and format exact integers in explicit radices플레이그라운드 열기 →import std.bigint { BigInt }import std.testimport std.iolet number = test.assertSome(BigInt.parse("ff", 16))io.writeLine(number.toString(2))io.writeLine(number.toString(10))io.writeLine(number.toString(16))io.writeLine(test.assertSome(BigInt.parse("z", 36)).toString(10))io.writeLine(test.assertSome(BigInt.parse("-00015", 10)).toString(16))io.writeLine(test.assertSome(BigInt.parse("-000", 10)).toString(36))io.writeLine(test.assertSome(BigInt.parse("123456789012345678901234567890", 10)).toString(10))
기대 출력종료 코드 0
11111111
255
ff
35
-f
0
123456789012345678901234567890
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력11111111255ff35-f0123456789012345678901234567890
이 예제는 아직 실행하지 않았습니다.
Reject surrounding whitespace in integer text
run · running · 검증 · 미실행
main.tpzReject surrounding whitespace in integer text플레이그라운드 열기 →import std.bigint { BigInt }import std.iomatch (BigInt.parse(" 10 ", 10)) { case None() => io.writeLine("whitespace rejected") case Some(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
whitespace rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject a leading plus sign in integer text
run · running · 검증 · 미실행
main.tpzReject a leading plus sign in integer text플레이그라운드 열기 →import std.bigint { BigInt }import std.iomatch (BigInt.parse("+10", 10)) { case None() => io.writeLine("plus rejected") case Some(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
plus rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject uppercase letters in integer text
run · running · 검증 · 미실행
main.tpzReject uppercase letters in integer text플레이그라운드 열기 →import std.bigint { BigInt }import std.iomatch (BigInt.parse("FF", 16)) { case None() => io.writeLine("uppercase rejected") case Some(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
uppercase rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 공백과 플러스 부호, 대문자를 허용한다. 같은 입력 값에 정규 형식과 다른 철자가 생깁니다.
이유
프로그램이 요청한 진법과 실제 숫자 철자가 그대로 대응합니다.
바뀐 규칙 Read and write integers in an explicit radix →
십진수 곱셈은 정규화한 결과의 자릿수를 검사합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
두 값의 중간 자릿수 합이 크더라도 끝의 0을 없애면 결과를 표현할 수 있습니다. 합부터 검사하면 그 결과가 거절됩니다.
결정
- 십진수는 임의 정밀도 정수 계수와 정규화한 자릿수 0부터 4294967295를 씁니다. 연산은 정확하고 출력 철자는 하나입니다.
- 곱셈 결과를 정규화한 뒤 자릿수의 범위를 검사합니다.
예제
Normalize signs and redundant decimal zeros
run · running · 검증 · 미실행
main.tpzNormalize signs and redundant decimal zeros플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}for text in (["0", "-0.000", "+00012.3400", ".0050", "100.000"]) { let value: Decimal = read(text) io.writeLine("{value.toString()} {value.scale()}") let reparsed: Option<Decimal> = Decimal.parse(value.toString()) let recovered: Decimal = test.assertSome(reparsed) test.assertEq(recovered, value)}
기대 출력종료 코드 0
0 0
0 0
12.34 2
0.005 3
100 0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력0 00 012.34 20.005 3100 0
이 예제는 아직 실행하지 않았습니다.
Keep every digit beyond machine integer precision
run · running · 검증 · 미실행
main.tpzKeep every digit beyond machine integer precision플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}let left: Decimal = read("1000000000000000000000000000000.25")let right: Decimal = read("0.75")let sum: Decimal = left + rightlet difference: Decimal = left - rightlet product: Decimal = left * rightio.writeLine(sum.toString())io.writeLine(difference.toString())io.writeLine(product.toString())io.writeLine(left.toString())
기대 출력종료 코드 0
1000000000000000000000000000001
999999999999999999999999999999.5
750000000000000000000000000000.1875
1000000000000000000000000000000.25
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력1000000000000000000000000000001999999999999999999999999999999.5750000000000000000000000000000.18751000000000000000000000000000000.25
이 예제는 아직 실행하지 않았습니다.
Normalize a product before checking its final scale
run · running · 검증 · 미실행
main.tpzNormalize a product before checking its final scale플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iolet parsedPlace: Option<Decimal> = Decimal.parse("0.1")let mut place: Decimal = test.assertSome(parsedPlace)let mut smallest: Decimal = (1).toDecimal()let mut step: int = 0while (step < 32) { smallest = smallest * place if (step < 31) { place = place * place } step = step + 1}let doubled: Decimal = smallest * (2).toDecimal()let parsedHalf: Option<Decimal> = Decimal.parse("0.5")let half: Decimal = test.assertSome(parsedHalf)let recovered: Decimal = doubled * halflet equal = recovered == smallestio.writeLine("{recovered.scale()} {equal}")
기대 출력종료 코드 0
4294967295 true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 곱셈의 임시 자릿수 합을 먼저 제한한다. 정규화하면 맞는 결과도 거절합니다.
이유
표현할 수 있는지 중간 계산 방식과 무관하게 판정합니다.
바뀐 규칙 Preserve exact decimal values and canonical scale →
십진수 읽기는 ASCII 입력 전체를 확인합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
공백이나 지수가 섞인 텍스트를 조용히 읽으면 어느 부분이 값으로 들어갔는지 알기 어렵습니다. 허용되는 철자의 경계가 필요합니다.
결정
ASCII 십진수 전체를 읽습니다. 부호와 .5는 허용합니다. 1., 공백, 지수, 구분자, 진법 접두사와 비 ASCII 숫자는 거절합니다.
예제
Accept explicit signs and fractional decimal text
run · running · 검증 · 미실행
main.tpzAccept explicit signs and fractional decimal text플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}for text in (["7", "+7", "-7", "0007", ".5", "-.5", "+.5", "01.0200"]) { let value: Decimal = read(text) io.writeLine(value.toString())}
기대 출력종료 코드 0
7
7
-7
7
0.5
-0.5
0.5
1.02
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject incomplete and nondecimal spellings
run · running · 검증 · 미실행
main.tpzReject incomplete and nondecimal spellings플레이그라운드 열기 →import std.decimal { Decimal }import std.iofor text in (["", "+", "-", ".", "+.", "-.", "1.", "1.2.3", "1e2", "1E+2", "0x10", "1_000", "1,2", "NaN", "Infinity", " 1", "1 ", "1.2", "١.٢", "1\n2", "\t1"]) { match (Decimal.parse(text)) { case None() => io.writeLine("rejected") case Some(_) => io.writeLine("accepted") }}
기대 출력종료 코드 0
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력rejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejectedrejected
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 느슨한 입력 형식을 허용한다. 숫자 이외의 문자를 입력마다 다르게 해석해야 합니다.
이유
어떤 텍스트가 십진수인지 결과를 보기 전에 알 수 있습니다.
바뀐 규칙 Parse complete finite decimal text →
십진 반올림은 방향과 동점 규칙을 드러냅니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
같은 수에서 하한, 상한, 0 방향의 결과가 우연히 같을 수 있습니다. 값이 달라졌을 때 어떤 의도를 유지할지 이름에서 알아야 합니다.
결정
여섯 반올림 방식을 제공합니다. 기본은 HalfEven이고, 부호에 따른 방향과 동점 처리가 각각 정해져 있습니다.
예제
Resolve positive and negative ties in every rounding mode
run · running · 검증 · 미실행
main.tpzResolve positive and negative ties in every rounding mode플레이그라운드 열기 →import std.decimal { Decimal, RoundingMode }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}function rounded(text: string, mode: RoundingMode) -> string { let value: Decimal = read(text) return value.round(0, mode).toString()}let modes: Array<RoundingMode> = [RoundingMode.Down(), RoundingMode.Up(), RoundingMode.TowardZero(), RoundingMode.AwayFromZero(), RoundingMode.HalfUp(), RoundingMode.HalfEven()]for mode in (modes) { let a = rounded("2.5", mode) let b = rounded("3.5", mode) let c = rounded("-2.5", mode) let d = rounded("-3.5", mode) io.writeLine("{a} {b} {c} {d}")}
기대 출력종료 코드 0
2 3 -3 -4
3 4 -2 -3
2 3 -2 -3
3 4 -3 -4
3 4 -3 -4
2 4 -2 -4
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력2 3 -3 -43 4 -2 -32 3 -2 -33 4 -3 -43 4 -3 -42 4 -2 -4
이 예제는 아직 실행하지 않았습니다.
Distinguish directed rounding from nearest rounding
run · running · 검증 · 미실행
main.tpzDistinguish directed rounding from nearest rounding플레이그라운드 열기 →import std.decimal { Decimal, RoundingMode }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}function rounded(text: string, mode: RoundingMode) -> string { let value: Decimal = read(text) return value.round(0, mode).toString()}let modes: Array<RoundingMode> = [RoundingMode.Down(), RoundingMode.Up(), RoundingMode.TowardZero(), RoundingMode.AwayFromZero(), RoundingMode.HalfUp(), RoundingMode.HalfEven()]for mode in (modes) { let a = rounded("2.1", mode) let b = rounded("2.9", mode) let c = rounded("-2.1", mode) let d = rounded("-2.9", mode) io.writeLine("{a} {b} {c} {d}")}
기대 출력종료 코드 0
2 2 -3 -3
3 3 -2 -2
2 2 -2 -2
3 3 -3 -3
2 3 -2 -3
2 3 -2 -3
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력2 2 -3 -33 3 -2 -22 2 -2 -23 3 -3 -32 3 -2 -32 3 -2 -3
이 예제는 아직 실행하지 않았습니다.
Apply the default mode and normalize a carry or zero
run · running · 검증 · 미실행
main.tpzApply the default mode and normalize a carry or zero플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}let value: Decimal = read("1.245")io.writeLine(value.round(2).toString())io.writeLine(read("1.255").round(2).toString())io.writeLine(value.round(5).toString())let carry: Decimal = read("9.995").round(2)let zero: Decimal = read("-0.004").round(2)io.writeLine("{carry.toString()} {carry.scale()}")io.writeLine("{zero.toString()} {zero.scale()}")io.writeLine(value.toString())
기대 출력종료 코드 0
1.24
1.26
1.245
10 0
0 0
1.245
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력1.241.261.24510 00 01.245
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 결과가 같아 보이는 방식들을 합친다. 하한, 상한, 0 방향, 최근접이라는 서로 다른 선택을 표현하기 어렵습니다.
이유
입력이 바뀌어도 코드에 적은 반올림 의도가 유지됩니다.
바뀐 규칙 Choose a decimal grid and a rounding direction →
십진 나눗셈은 정확한 몫을 한 번만 반올림합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
몫을 중간에 반올림하면 요청한 자릿수에서 다른 결과가 나올 수 있습니다. 내부 자릿수의 합 때문에 정확한 0을 거절하는 문제도 있었습니다.
결정
- 정확한 몫을 요청한 자릿수에서 한 번 반올림합니다. 내부 자릿수 합이 크다는 이유로 0인 몫을 거절하지 않습니다.
- 0으로 나누면
Err를 돌려줍니다. 잘못된 자릿수는 실행 단계의 TPZ5001입니다.
예제
Distinguish exact and repeating quotients at the requested grid
run · running · 검증 · 미실행
main.tpzDistinguish exact and repeating quotients at the requested grid플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction show(result: Result<Decimal, string>) -> () { let value: Decimal = test.assertOk(result) io.writeLine("{value.toString()} {value.scale()}")}let one: Decimal = (1).toDecimal()let third: Result<Decimal, string> = one.div((3).toDecimal(), 6)let eighth: Result<Decimal, string> = one.div((8).toDecimal(), 2)let negativeTie: Result<Decimal, string> = (-1).toDecimal().div((8).toDecimal(), 2)let exact: Result<Decimal, string> = (100).toDecimal().div((4).toDecimal(), 4)let integerGrid: Result<Decimal, string> = (2).toDecimal().div((3).toDecimal(), 0)show(third)show(eighth)show(negativeTie)show(exact)show(integerGrid)
기대 출력종료 코드 0
0.333333 6
0.12 2
-0.12 2
25 0
1 0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력0.333333 60.12 2-0.12 225 01 0
이 예제는 아직 실행하지 않았습니다.
Apply every rounding mode to signed quotient ties
run · running · 검증 · 미실행
main.tpzApply every rounding mode to signed quotient ties플레이그라운드 열기 →import std.decimal { Decimal, RoundingMode }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}function quotient(text: string, mode: RoundingMode) -> string { let value: Decimal = read(text) let result: Result<Decimal, string> = value.div((2).toDecimal(), 0, mode) let rounded: Decimal = test.assertOk(result) return rounded.toString()}let modes: Array<RoundingMode> = [RoundingMode.Down(), RoundingMode.Up(), RoundingMode.TowardZero(), RoundingMode.AwayFromZero(), RoundingMode.HalfUp(), RoundingMode.HalfEven()]for mode in (modes) { let a = quotient("5", mode) let b = quotient("7", mode) let c = quotient("-5", mode) let d = quotient("-7", mode) io.writeLine("{a} {b} {c} {d}")}
기대 출력종료 코드 0
2 3 -3 -4
3 4 -2 -3
2 3 -2 -3
3 4 -3 -4
3 4 -3 -4
2 4 -2 -4
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력2 3 -3 -43 4 -2 -32 3 -2 -33 4 -3 -43 4 -3 -42 4 -2 -4
이 예제는 아직 실행하지 않았습니다.
Return a recoverable error for every zero divisor
run · running · 검증 · 미실행
main.tpzReturn a recoverable error for every zero divisor플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}let divisor: Decimal = read("-0.000")let numerators: Array<Decimal> = [(0).toDecimal(), (1).toDecimal()]for numerator in (numerators) { let result: Result<Decimal, string> = numerator.div(divisor, 2) match (result) { case Err(message) => io.writeLine(message) case Ok(_) => io.writeLine("accepted") }}io.writeLine(divisor.toString())
기대 출력종료 코드 0
Decimal.div: division by zero
Decimal.div: division by zero
0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력Decimal.div: division by zeroDecimal.div: division by zero0
이 예제는 아직 실행하지 않았습니다.
Keep a zero quotient at the largest valid scale
run · running · 검증 · 미실행
main.tpzKeep a zero quotient at the largest valid scale플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}let divisor: Decimal = read("0.1")let result: Result<Decimal, string> = (0).toDecimal().div(divisor, 4294967295)match (result) { case Ok(value) => io.writeLine(value.toString()) case Err(_) => io.writeLine("unexpected error")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject an invalid scale before classifying a zero divisor
run · running · 검증 · 미실행
main.tpzReject an invalid scale before classifying a zero divisor플레이그라운드 열기 →import std.decimal { Decimal }import std.iolet value: Decimal = (1).toDecimal()value.div((0).toDecimal(), -1)io.writeLine("after")
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject an invalid scale before classifying a zero divisor
run · running · 검증 · 미실행
main.tpzReject an invalid scale before classifying a zero divisor플레이그라운드 열기 →import std.decimal { Decimal }import std.iolet value: Decimal = (1).toDecimal()value.div((0).toDecimal(), 4294967296)io.writeLine("after")
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 run. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 중간 자릿수의 합부터 제한한다. 결과가 표현 가능한 0이어도 올바른 연산을 거절할 수 있습니다.
이유
요청한 자릿수와 반올림 방식이 몫을 결정합니다.
바뀐 규칙 Divide with an explicit result scale →
십진수의 정수 변환은 정확할 때만 값을 돌려줍니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
소수가 있는 값을 정수로 바꾸면 일부 정보를 잃을 수 있습니다. 너무 큰 값에서는 정수 범위를 넘을 수도 있습니다.
결정
int.toDecimal은 정확합니다. toInt는 소수 부분이 있거나 범위를 넘을 때 None()을 돌려줍니다.- 암시적으로 변환하지 않습니다.
BigInt와는 기존 십진 텍스트 API를 통해 명시적으로 교환합니다.
예제
Convert both int endpoints and reject fractions or overflow
run · running · 검증 · 미실행
main.tpzConvert both int endpoints and reject fractions or overflow플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}for text in (["-9223372036854775808", "9223372036854775807", "-9223372036854775809", "9223372036854775808", "1.000", "1.001", "-1.001", "-0.000"]) { let value: Decimal = read(text) match (value.toInt()) { case Some(integer) => io.writeLine("{integer}") case None() => io.writeLine("not an int") }}let large: Decimal = read("1000000000000000000000000000000")let narrowed: Option<int> = large.toInt()test.assertNone(narrowed)io.writeLine(large.toString())
기대 출력종료 코드 0
-9223372036854775808
9223372036854775807
not an int
not an int
1
not an int
not an int
0
1000000000000000000000000000000
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력-92233720368547758089223372036854775807not an intnot an int1not an intnot an int01000000000000000000000000000000
이 예제는 아직 실행하지 않았습니다.
Convert int values to exact scale zero decimals
run · running · 검증 · 미실행
main.tpzConvert int values to exact scale zero decimals플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iolet integers: Array<int> = [-9223372036854775807 - 1, -1, 0, 1, 9223372036854775807]for integer in (integers) { let value: Decimal = integer.toDecimal() let narrowed: Option<int> = value.toInt() let recovered: int = test.assertSome(narrowed) test.assertEq(recovered, integer) io.writeLine("{value.toString()} {value.scale()}")}
기대 출력종료 코드 0
-9223372036854775808 0
-1 0
0 0
1 0
9223372036854775807 0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력-9223372036854775808 0-1 00 01 09223372036854775807 0
이 예제는 아직 실행하지 않았습니다.
Exchange arbitrary precision integers through explicit decimal text
run · running · 검증 · 미실행
main.tpzExchange arbitrary precision integers through explicit decimal text플레이그라운드 열기 →import std.decimal { Decimal }import std.bigint { BigInt }import std.testimport std.iolet parsedInteger: Option<BigInt> = BigInt.parse("123456789012345678901234567890", 10)let integer: BigInt = test.assertSome(parsedInteger)let parsedDecimal: Option<Decimal> = Decimal.parse(integer.toString(10))let value: Decimal = test.assertSome(parsedDecimal)io.writeLine(value.toString())let parsedAgain: Option<BigInt> = BigInt.parse(value.toString(), 10)let recovered: BigInt = test.assertSome(parsedAgain)let equal = recovered == integerio.writeLine("{equal}")let parsedFraction: Option<Decimal> = Decimal.parse("1.5")let fraction: Decimal = test.assertSome(parsedFraction)let integral: Option<BigInt> = BigInt.parse(fraction.toString(), 10)match (integral) { case None() => io.writeLine("fraction rejected") case Some(_) => io.writeLine("converted")}
기대 출력종료 코드 0
123456789012345678901234567890
true
fraction rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력123456789012345678901234567890truefraction rejected
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 혼합 계산에서 자동으로 변환하고 소수부를 버린다. 정밀도가 줄어도 호출 코드에 드러나지 않습니다.
이유
넘침과 소수부 손실을 호출자가 직접 다룰 수 있습니다.
바뀐 규칙 Convert numeric values explicitly and without truncation →
십진수는 정확한 수치 값으로 비교합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
1.0과 1.00은 철자는 다르지만 같은 수입니다. 입력 자릿수가 비교에 들어가면 정렬과 동등성이 달라집니다.
결정
수치 값 그대로 동등성과 순서를 정합니다. 뒤의 0과 0의 부호는 영향을 주지 않으며 이진 부동소수점으로 변환하지 않습니다.
예제
Treat values with different input padding as equal
run · running · 검증 · 미실행
main.tpzTreat values with different input padding as equal플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}let left: Decimal = read("1.20")let right: Decimal = read("1.2000")let equal = left == rightlet unequal = left != rightlet less = left < rightlet lessOrEqual = left <= rightlet greater = left > rightlet greaterOrEqual = left >= rightio.writeLine("{equal} {unequal} {less} {lessOrEqual} {greater} {greaterOrEqual}")io.writeLine("{left.scale()} {right.scale()}")
기대 출력종료 코드 0
true false false true false true
1 1
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력true false false true false true1 1
이 예제는 아직 실행하지 않았습니다.
Order neighboring large values and signed zero exactly
run · running · 검증 · 미실행
main.tpzOrder neighboring large values and signed zero exactly플레이그라운드 열기 →import std.decimal { Decimal }import std.testimport std.iofunction read(text: string) -> Decimal { let parsed: Option<Decimal> = Decimal.parse(text) let value: Decimal = test.assertSome(parsed) return value}let lower: Decimal = read("9007199254740992")let higher: Decimal = read("9007199254740993")let increasing = lower < higherlet decreasing = higher > lowerlet distinct = lower != higherlet negativeOrder = -higher < -lowerio.writeLine("{increasing} {decreasing} {distinct} {negativeOrder}")let negativeZero: Decimal = read("-0.000")let zero: Decimal = (0).toDecimal()let sameZero = negativeZero == zeroio.writeLine("{sameZero}")
기대 출력종료 코드 0
true true true true
true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 소수 자릿수도 맞아야 같다고 본다. 같은 값을 입력 철자 때문에 다르게 비교합니다.
이유
십진수의 비교 결과를 표현 방식에 기대지 않고 사용할 수 있습니다.
바뀐 규칙 Compare exact decimal values independently of input scale →
파일 시스템 함수는 바이트와 목록 순서를 보장합니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
파일을 바이트로 읽거나 디렉터리 목록을 비교할 때 호스트마다 결과가 달라지면 다루기 어렵습니다. 읽기 실패를 처리하려면 실패한 경로도 필요합니다.
결정
- 바이트를 그대로 보존합니다. 텍스트는 올바른 UTF-8만 디코딩합니다.
- 디렉터리의 바로 아래 항목을 정렬하고 유니코드로 나타낼 수 없는 이름은 거부합니다.
- 호스트 오류에는 실패한 연산과 경로를 담습니다.
예제
Preserve a byte order mark and physical line endings
run · running · 검증 · 미실행
main.tpzPreserve a byte order mark and physical line endingsimport std.fsimport std.testimport std.ioio.writeLine(test.assertOk(fs.readText("source.txt")))
source.txtPreserve a byte order mark and physical line endings 기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Preserve raw bytes and reject invalid UTF-8 text
run · running · 검증 · 미실행
main.tpzPreserve raw bytes and reject invalid UTF-8 textimport std.fsimport std.bytes { Bytes }import std.testimport std.iolet bytes = test.assertOk(Bytes.fromArray([0, 65, 255]))test.assertOk(fs.writeBytes("data.bin", bytes))io.writeLine(test.assertOk(fs.readBytes("data.bin")).toHex())test.assertErr(fs.readText("data.bin"))io.writeLine("invalid text rejected")test.assertOk(fs.writeBytes("data.bin", Bytes.empty()))io.writeLine(test.assertOk(fs.readBytes("data.bin")).toHex())
기대 출력종료 코드 0
0041ff
invalid text rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력0041ffinvalid text rejected
이 예제는 아직 실행하지 않았습니다.
List immediate entries in exact name order
run · running · 검증 · 미실행
main.tpzList immediate entries in exact name orderimport std.fsimport std.testimport std.iolet entries = test.assertOk(fs.list("entries"))for entry in (entries) { let size = match (entry.sizeBytes) { case Some(value) => "{value}" case None() => "none" } io.writeLine("{entry.name} {entry.kind} {size}")}
기대 출력종료 코드 0
a.txt file 1
nested directory none
z.txt file 2
entries/z.txtList immediate entries in exact name order entries/a.txtList immediate entries in exact name order entries/nested/inside.txtList immediate entries in exact name order 기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력a.txt file 1nested directory nonez.txt file 2
이 예제는 아직 실행하지 않았습니다.
Identify the operation and path in a readText error
run · running · 검증 · 미실행
main.tpzIdentify the operation and path in a readText error플레이그라운드 열기 →import std.fsimport std.bytes { Bytes }import std.testimport std.iolet error = test.assertErr(fs.readText("missing/item.txt"))let operation = error.contains("readText")let path = error.contains("missing/item.txt")io.writeLine("{operation} {path}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Identify the operation and path in a list error
run · running · 검증 · 미실행
main.tpzIdentify the operation and path in a list error플레이그라운드 열기 →import std.fsimport std.bytes { Bytes }import std.testimport std.iolet error = test.assertErr(fs.list("missing/item.txt"))let operation = error.contains("list")let path = error.contains("missing/item.txt")io.writeLine("{operation} {path}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
이유
목록을 일정한 순서로 사용하고 오류에서 어느 경로의 작업이 실패했는지 찾을 수 있습니다.
바뀐 규칙 Read and replace whole files and list directories →
main이 받는 표준 입력은 한 번만 소비됩니다
2026년 11월 16일 채택 · 6.0.0 · 확인 중
문제
main에 표준 입력을 넘긴 뒤 본문에서 또 읽으면 같은 데이터가 다시 나오는지 알아야 합니다. 같은 데이터를 두 경로에서 받으면 스트림의 소비 규칙이 달라집니다.
결정
main(args, stdin)을 쓰면 실행기가 표준 입력을 끝까지 읽어 stdin으로 넘깁니다. 이후 본문에서 io.readStdin을 부르면 빈 문자열을 받습니다.
예제
The main argument consumes standard input
run · runtime · 검증 · 미실행
main.tpzThe main argument consumes standard inputimport std.ioexport function main(args: Array<string>, stdin: string) -> Result<int, string> { io.writeLine(stdin) let exhausted = io.readStdin() == "" io.writeLine("{exhausted}") Ok(0)}
기대 출력종료 코드 0
incoming
true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 두 경로에서 같은 입력을 다시 받도록 한다. 이미 읽은 스트림을 두 번째로 소비할 수 있는 것처럼 보입니다.
이유
어떤 경로로 읽었는지에 관계없이 입력은 한 번만 소비됩니다.
바뀐 규칙 Read standard input through its end →
파일 스트림은 기존 파일을 열고 위치와 닫힘 상태를 공유합니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
한 파일 핸들을 여러 이름으로 쓸 수 있습니다. 파일을 열 때 내용을 보존하는지와 다른 이름으로 닫은 뒤 계속 읽을 수 있는지 알아야 합니다.
결정
- 기존 일반 파일을 읽고 쓸 수 있게 엽니다. 새로 만들거나 내용을 잘라내지 않습니다.
- 같은 핸들의 별칭은 읽고 쓰는 위치와 닫힘 상태를 공유합니다.
- 표준 입력은 EOF까지 읽고 파일 전체 교체에는
std.fs를 씁니다. - 표준 입력은 EOF까지 읽고, 파일에 쓰면 커서가 쓴 만큼 앞으로 갑니다.
예제
Open and close an existing file without changing its bytes
run · running · 검증 · 미실행
main.tpzOpen and close an existing file without changing its bytesimport std.ioimport std.fsimport std.testlet file = test.assertOk(io.open("source.txt"))file.close()io.writeLine(test.assertOk(fs.readText("source.txt")))let missing = test.assertErr(io.open("missing.txt"))let named = missing.contains("missing.txt")io.writeLine("missing {named}")
기대 출력종료 코드 0
original
missing true
source.txtOpen and close an existing file without changing its bytes 기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Write at the cursor and retain the rest of the file
run · running · 검증 · 미실행
main.tpzWrite at the cursor and retain the rest of the fileimport std.ioimport std.fsimport std.testlet file = test.assertOk(io.open("source.txt"))test.assertOk(file.write("XY"))let tail = test.assertOk(file.read())io.writeLine("tail {tail}")file.close()let whole = test.assertOk(fs.readText("source.txt"))io.writeLine("whole {whole}")
기대 출력종료 코드 0
tail cdef
whole XYcdef
source.txtWrite at the cursor and retain the rest of the file 기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Close every alias and reject later access
run · running · 검증 · 미실행
main.tpzClose every alias and reject later accessimport std.ioimport std.fsimport std.testlet file = test.assertOk(io.open("source.txt"))let alias = filefile.close()alias.close()test.assertErr(alias.read())io.writeLine("read rejected")test.assertErr(alias.write("changed"))io.writeLine("write rejected")io.writeLine(test.assertOk(fs.readText("source.txt")))
기대 출력종료 코드 0
read rejected
write rejected
original
source.txtClose every alias and reject later access 기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력read rejectedwrite rejectedoriginal
이 예제는 아직 실행하지 않았습니다.
Share the cursor across file aliases
run · running · 검증 · 미실행
main.tpzShare the cursor across file aliasesimport std.ioimport std.testlet file = test.assertOk(io.open("source.txt"))let alias = fileio.writeLine(test.assertOk(file.read()))let tail = test.assertOk(alias.read())let atEnd = tail == ""io.writeLine("{atEnd}")alias.close()
source.txtShare the cursor across file aliases 기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
이유
스트림 사용 중 별칭으로 한 작업을 다른 별칭에서 이어갈 수 있습니다.
바뀐 규칙 Use a file handle with a shared cursor →
JSON의 null은 kind로 확인합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
JSON 값이 null인지 확인하는 코드가 있습니다. 다른 다섯 종류를 확인하는 코드와 같은 방식이면 종류를 바꿔도 검사가 일정합니다.
결정
JSONValue.isNull()을 없애고 value.kind() == "null"을 씁니다.
예제
Distinguish null from every other JSON kind
run · running · 검증 · 미실행
main.tpzDistinguish null from every other JSON kind플레이그라운드 열기 →import std.jsonimport std.testimport std.iofor source in (["null", "false", "0", "\"\"", "[]", "\{\}"]) { let value = test.assertOk(json.parse(source)) let kind = value.kind() let nullKind = kind == "null" io.writeLine("{kind}:{nullKind}")}
기대 출력종료 코드 0
null:true
bool:false
number:false
string:false
array:false
object:false
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력null:truebool:falsenumber:falsestring:falsearray:falseobject:false
이 예제는 아직 실행하지 않았습니다.
Keep present null values distinct from missing entries
run · running · 검증 · 미실행
main.tpzKeep present null values distinct from missing entries플레이그라운드 열기 →import std.jsonimport std.testimport std.iolet array = test.assertOk(json.parse("[null]"))let object = test.assertOk(json.parse("\{\"present\":null\}"))let arrayValue = test.assertSome(array.at(0))let objectValue = test.assertSome(object.get("present"))test.assertNone(array.at(1))test.assertNone(object.get("absent"))io.writeLine("{arrayValue.kind()}:{objectValue.kind()}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Use kind to test a JSON value for null
check · checking · 검증 · 미실행
main.tpzUse kind to test a JSON value for null플레이그라운드 열기 →import std.json { JSONValue }function inspect(value: JSONValue) -> () { let result = value.kind() == "null" return ()}
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject the removed JSONValue.isNull member
reject · checking · 검증 · 미실행
main.tpzReject the removed JSONValue.isNull memberimport std.json { JSONValue }function inspect(value: JSONValue) -> () { let result = value.isNull() return ()}
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
isNull을 유지한다. null만 같은 종류 검사를 두 이름으로 쓸 수 있습니다.
이유
여섯 JSON 종류를 한 가지 방식으로 검사할 수 있습니다.
바뀐 규칙 Inspect JSON kinds with kind →
JSON 숫자는 원래 표기를 보존합니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
JSON 숫자 1과 1e0은 수로는 같지만 텍스트가 다릅니다. 트리에서 바로 꺼낼 때와 정수형으로 디코딩할 때 필요한 조건도 다릅니다.
결정
- JSON 숫자의 원문 철자를 정확히 보존합니다.
asInt는 부호가 붙을 수 있는 10진 정수 철자에만 적용하며 값은 64비트 정수 범위에 있어야 합니다.- 정수 타입으로 디코딩할 때는 정확한 수학적 변환을 적용합니다.
예제
Keep integer projection within the declared spelling and range
run · running · 검증 · 미실행
main.tpzKeep integer projection within the declared spelling and range플레이그라운드 열기 →import std.jsonimport std.testimport std.iofor text in (["-9223372036854775808", "9223372036854775807", "9223372036854775808", "-0", "1.0", "1e0", "1.5"]) { let value = test.assertOk(json.parse(text)) match (value.asInt()) { case Some(number) => io.writeLine("{text} = {number}") case None() => io.writeLine("{text} = none") }}
기대 출력종료 코드 0
-9223372036854775808 = -9223372036854775808
9223372036854775807 = 9223372036854775807
9223372036854775808 = none
-0 = 0
1.0 = none
1e0 = none
1.5 = none
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력-9223372036854775808 = -92233720368547758089223372036854775807 = 92233720368547758079223372036854775808 = none-0 = 01.0 = none1e0 = none1.5 = none
이 예제는 아직 실행하지 않았습니다.
Retain numbers beyond binary and integer precision
run · running · 검증 · 미실행
main.tpzRetain numbers beyond binary and integer precision플레이그라운드 열기 →import std.jsonimport std.testimport std.iofor text in (["9007199254740993", "9223372036854775808", "-0", "1.2300e+03", "1e9999"]) { let value = test.assertOk(json.parse(text)) io.writeLine(test.assertSome(value.numberText()))}
기대 출력종료 코드 0
9007199254740993
9223372036854775808
-0
1.2300e+03
1e9999
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력90071992547409939223372036854775808-01.2300e+031e9999
이 예제는 아직 실행하지 않았습니다.
Decode a record after parsing and report invalid data
run · running · 검증 · 미실행
main.tpzDecode a record after parsing and report invalid data플레이그라운드 열기 →import std.jsonimport std.testimport std.iorecord Item derives JSON { name: string, count: int = 7 }let item = test.assertOk(json.parseAs<Item>("\{\"name\":\"ink\",\"extra\":true\}"))io.writeLine("{item.name},{item.count}")for text in (["\{\}", "17", "[", "\{\"name\":\"ink\",\"count\":9223372036854775808\}"]) { match (json.parseAs<Item>(text)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("invalid data") }}
기대 출력종료 코드 0
ink,7
invalid data
invalid data
invalid data
invalid data
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력ink,7invalid datainvalid datainvalid datainvalid data
이 예제는 아직 실행하지 않았습니다.
이유
원래 텍스트를 잃지 않고 정수 값이 필요한 곳에서 정확한 변환을 할 수 있습니다.
바뀐 규칙 Project JSON values without coercion →Parse a complete JSON document →Parse text before typed JSON decoding →
JSON 파서는 문서 전체를 읽고 중복 키를 거절합니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
숫자 뒤에 다른 문자열이 붙거나 같은 키가 이스케이프 표기로 두 번 나올 수 있습니다. 오류 위치는 멀티바이트 문자가 있어도 찾을 수 있어야 합니다.
결정
- 완전한 문서 하나를 읽고 디코딩한 키가 중복되면 거절합니다.
- 중첩 깊이는 최대 128입니다.
- 오류는 1부터 세는 유니코드 스칼라 위치에 표시합니다. 문제가 된 문자, 두 번째 키의 여는 따옴표, 또는 입력 끝을 가리킵니다.
- 오류 위치의 줄 번호를 셀 때 CRLF는 줄바꿈 하나이고, 단독 CR과 단독 LF도 각각 줄바꿈 하나입니다.
예제
Locate the first invalid scalar and end of input
run · running · 검증 · 미실행
main.tpzLocate the first invalid scalar and end of input플레이그라운드 열기 →import std.jsonimport std.iofor text in (["", "true false", "[1,]", "[1 x]", "[\rtrue,\r?]"]) { match (json.parse(text)) { case Ok(_) => io.writeLine("accepted") case Err(error) => io.writeLine("{error.line},{error.column}") }}
기대 출력종료 코드 0
1,1
1,6
1,4
1,4
3,1
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject a repeated decoded key at its opening quote
run · running · 검증 · 미실행
main.tpzReject a repeated decoded key at its opening quote플레이그라운드 열기 →import std.jsonimport std.iomatch (json.parse("\{\"a\":1,\"\\u0061\":2\}")) { case Ok(_) => io.writeLine("accepted") case Err(error) => io.writeLine("{error.line},{error.column}")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Decode surrogate pairs and reject malformed JSON spellings
run · running · 검증 · 미실행
main.tpzDecode surrogate pairs and reject malformed JSON spellings플레이그라운드 열기 →import std.jsonimport std.testimport std.iolet value = test.assertOk(json.parse("\"\\uD83D\\uDE00\""))test.assertEq(test.assertSome(value.asString()), "😀")for text in (["01", "+1", "1.", "1e", "NaN", "\"\\uD800\"", "\"\\uDC00\""]) { match (json.parse(text)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("invalid") }}
기대 출력종료 코드 0
invalid
invalid
invalid
invalid
invalid
invalid
invalid
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력invalidinvalidinvalidinvalidinvalidinvalidinvalid
이 예제는 아직 실행하지 않았습니다.
Accept depth 128 and reject the next child
run · running · 검증 · 미실행
main.tpzAccept depth 128 and reject the next child플레이그라운드 열기 →import std.jsonimport std.iolet mut text = "0"for level in (0 ..< 128) { text = "[" + text + "]"}match (json.parse(text)) { case Ok(_) => io.writeLine("depth 128 accepted") case Err(_) => io.writeLine("depth 128 rejected")}match (json.parse("[" + text + "]")) { case Ok(_) => io.writeLine("depth 129 accepted") case Err(_) => io.writeLine("depth 129 rejected")}
기대 출력종료 코드 0
depth 128 accepted
depth 129 rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력depth 128 accepteddepth 129 rejected
이 예제는 아직 실행하지 않았습니다.
이유
잘못된 문서 전체를 거부하고, 입력에서 바로 고칠 지점을 찾을 수 있습니다.
바뀐 규칙 Parse a complete JSON document →
JSON 쓰기는 객체 키를 정렬합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
같은 객체가 서로 다른 키 순서로 출력되면 결과를 비교하기 어렵습니다. 타입 변환에 사용자 디코더가 있을 때는 문서를 다 읽는 시점도 중요합니다.
결정
- JSON 프로토콜 호출은 한 번만 수행합니다.
- 공백을 최소화해 출력하고 객체 키는 정렬합니다. 배열 순서와 저장한 숫자 철자는 보존합니다.
- 타입을 지정한 디코더는 문서를 모두 읽은 뒤 호출합니다.
parseAs는 구문 분석을 마친 뒤 디코더를 한 번 부릅니다. 사용자 코덱의 효과는 일반 함수 평가 순서를 따릅니다.
예제
Write sorted objects and preserve a parsed number lexeme
run · running · 검증 · 미실행
main.tpzWrite sorted objects and preserve a parsed number lexeme플레이그라운드 열기 →import std.jsonimport std.testimport std.ioio.writeLine(test.assertOk(json.stringify(map { "z": 1, "a": 2 })))io.writeLine(test.assertOk(json.stringify(["a,b", "x\"y", "\n", "é"])))let number = test.assertOk(json.parse("1.2300e+03"))io.writeLine(test.assertOk(json.stringify(number)))let empty: Array<int> = []io.writeLine(test.assertOk(json.stringify(empty)))
기대 출력종료 코드 0
{"a":2,"z":1}
["a,b","x\"y","\n","é"]
1.2300e+03
[]
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력{"a":2,"z":1}["a,b","x\"y","\n","é"]1.2300e+03[]
이 예제는 아직 실행하지 않았습니다.
Call a custom decoder once after complete parsing
run · running · 검증 · 미실행
main.tpzCall a custom decoder once after complete parsingimport std.json { JSONValue, parseAs }import std.iorecord Token { text: string }impl JSON<Token> { function encode(value: Token) -> Result<JSONValue, string> { JSON.encode(value.text) } function decode(value: JSONValue) -> Result<Token, string> { io.writeLine("decode") match (value.asString()) { case Some(text) => Ok(Token { text: text }) case None() => Err("expected token string") } }}match (parseAs<Token>("\"ink\"")) { case Ok(value) => io.writeLine(value.text) case Err(message) => io.writeLine(message)}match (parseAs<Token>("\"ink\" false")) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("parse failed before decode")}
기대 출력종료 코드 0
decode
ink
parse failed before decode
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력decodeinkparse failed before decode
이 예제는 아직 실행하지 않았습니다.
이유
출력 순서가 일정하고 완전하지 않은 문서가 디코더를 먼저 실행하지 않습니다.
바뀐 규칙 Serialize JSON in a deterministic order →Parse text before typed JSON decoding →
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
같은 이름이 두 열에 나타나면 이름만으로 값을 고를 수 없습니다. 두 열을 바꾸는 것만으로 읽히는 값이 달라질 수 있습니다.
결정
이름 기반 CSV 읽기는 헤더가 중복되면 오류를 반환합니다.
예제
run · running · 검증 · 미실행
main.tpzRead unique named columns플레이그라운드 열기 →import std.csvimport std.testimport std.iolet rows = test.assertOk(csv.parseWithHeader("name,count\nTopaz,6"))let row = test.assertSome(rows.get(0))io.writeLine(test.assertSome(row.get("name")))io.writeLine(test.assertSome(row.get("count")))
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzReject duplicate names플레이그라운드 열기 →import std.csvimport std.iomatch (csv.parseWithHeader("name,name\nleft,right")) { case Err(_) => io.writeLine("duplicate headers rejected") case Ok(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
duplicate headers rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력duplicate headers rejected
이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzReject duplicate names after reversing values플레이그라운드 열기 →import std.csvimport std.iomatch (csv.parseWithHeader("name,name\nright,left")) { case Err(_) => io.writeLine("duplicate headers rejected") case Ok(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
duplicate headers rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력duplicate headers rejected
이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzReject duplicate names even when the values agree플레이그라운드 열기 →import std.csvimport std.iomatch (csv.parseWithHeader("name,name\nsame,same")) { case Err(_) => io.writeLine("duplicate headers rejected") case Ok(_) => io.writeLine("accepted")}
기대 출력종료 코드 0
duplicate headers rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력duplicate headers rejected
이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzPreserve repeated header text in positional rows플레이그라운드 열기 →import std.csvimport std.testimport std.iolet rows = test.assertOk(csv.parse("name,name\nleft,right"))let row = test.assertSome(rows.get(1))io.writeLine("{row[0]}:{row[1]}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 첫 번째나 마지막 열의 값을 사용한다. 두 열의 순서를 바꾸면 같은 이름에서 다른 값을 읽습니다.
이유
중복 헤더를 발견한 호출자가 데이터나 열 이름을 바로잡을 수 있습니다.
바뀐 규칙 Require unique headers for named CSV rows →
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
호출자가 출력 열을 정할 때 같은 이름을 두 번 넣을 수 있습니다. 행에 열이 없거나 여분의 필드가 있을 때의 출력도 정해야 합니다.
결정
stringifyWithHeader는 Result<string, string>을 반환하고 요청에 중복 열 이름이 있으면 오류를 돌려줍니다.- 요청 순서를 지키고 빠진 필드는 빈 칸으로 쓰며 여분의 필드는 건너뜁니다.
- 각 행 끝에 LF를 쓰고 빈 칸 하나만 있는 행의 그 칸에는 따옴표를 씁니다.
- 두 쓰기 함수 모두 레코드마다 LF를 붙이고, 필드가 하나뿐이고 비어 있으면 그 필드를 따옴표로 감쌉니다.
예제
run · running · 검증 · 미실행
main.tpzChoose output columns explicitly and fill absent cells플레이그라운드 열기 →import std.csvimport std.jsonimport std.testimport std.iolet rows = [map { "name": "Topaz", "extra": "ignored", "count": "6" }, map { "name": "Ink" }]let text = test.assertOk(csv.stringifyWithHeader(rows, ["count", "name"]))io.writeLine(test.assertOk(json.stringify(text)))let noRows: Array<Map<string, string>> = []io.writeLine(test.assertOk(json.stringify(test.assertOk(csv.stringifyWithHeader(noRows, ["name"])))))
기대 출력종료 코드 0
"count,name\n6,Topaz\n,Ink\n"
"name\n"
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력"count,name\n6,Topaz\n,Ink\n""name\n"
이 예제는 아직 실행하지 않았습니다.
Reject duplicate columns before serializing a row
run · running · 검증 · 미실행
main.tpzReject duplicate columns before serializing a row플레이그라운드 열기 →import std.csvimport std.iolet rows: Array<Map<string, string>> = []match (csv.stringifyWithHeader(rows, ["name", "name"])) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("duplicate columns rejected")}
기대 출력종료 코드 0
duplicate columns rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력duplicate columns rejected
이 예제는 아직 실행하지 않았습니다.
이유
열 목록만으로 결과의 순서를 알 수 있고 중복 요청을 오류로 처리할 수 있습니다.
바뀐 규칙 Serialize positional and named CSV rows →
TOML은 윤초를 받고 중첩을 128까지 허용합니다
2026년 11월 16일 채택 · 6.0.0 · 확인 중
문제
TOML 시각에는 초가 60인 입력이 올 수 있습니다. 배열과 테이블이 아주 깊게 이어지면 읽기나 쓰기가 프로그램을 중단시킬 수 있습니다.
결정
- RFC 3339에 따라 초 값 60을 받습니다.
- 읽기와 쓰기에서 중첩 깊이를 128로 제한하며 넘으면
Err를 반환합니다.
예제
A TOML leap second is accepted and excessive nesting is rejected
run · runtime · 검증 · 미실행
main.tpzA TOML leap second is accepted and excessive nesting is rejectedimport std.ioimport std.tomlmatch (toml.parse("date = 2016-12-31T23:59:60Z")) { case Ok(_) => io.writeLine("leap second accepted") case Err(_) => io.writeLine("leap second rejected")}let mut left = ""let mut right = ""for depth in (0 ..< 129) { left = left + "[" right = right + "]"}match (toml.parse("value = " + left + "0" + right)) { case Ok(_) => io.writeLine("depth accepted") case Err(_) => io.writeLine("depth rejected")}
기대 출력종료 코드 0
leap second accepted
depth rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력leap second accepteddepth rejected
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 초 값 60을 거절한다. TOML이 따르는 날짜와 시간 규칙에 어긋납니다.
- 중첩 깊이에 한도를 두지 않는다. 너무 깊은 배열을 처리하다가 스택을 소진할 수 있습니다.
이유
윤초가 들어 있는 올바른 시각을 읽고 너무 깊은 문서를 오류로 처리할 수 있습니다.
바뀐 규칙 Parse complete TOML 1.0 documents →Write deterministic TOML documents →
TOML은 1.0 문법을 쓰고 JSON 변환 오류를 반환합니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
TOML에는 JSON에 바로 옮길 수 없는 숫자가 있습니다. 날짜 종류와 수의 범위를 보존하려면 변환 실패를 결과에서 구별해야 합니다.
결정
- TOML 1.0 형식을 읽고 최상위 테이블을 결정적인 순서로 씁니다.
- binary64 수와 날짜 종류의 경계를 보존합니다.
toJson은 Result<JSONValue, string>을 반환하고 유한하지 않은 수를 거절합니다. fromJson은 범위 밖 정수를 거절합니다.- TOML 안에서는 날짜 종류를 보존하지만, JSON 문자열로 바꾸면 TOML 날짜 종류는 남지 않습니다.
예제
run · running · 검증 · 미실행
main.tpzAccept literal strings, multiline values, radix integers and dates플레이그라운드 열기 →import std.tomlimport std.iofor text in (["title = 'ink#paper'\n", "text = \"\"\"\nfirst\nsecond\"\"\"\n", "value = 0xff\n", "date = 1979-05-27T07:32:00Z\n", "value = inf\n", "value = nan\n"]) { match (toml.parse(text)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("rejected") }}
기대 출력종료 코드 0
accepted
accepted
accepted
accepted
accepted
accepted
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력acceptedacceptedacceptedacceptedacceptedaccepted
이 예제는 아직 실행하지 않았습니다.
Reject a scalar as a complete TOML document
run · running · 검증 · 미실행
main.tpzReject a scalar as a complete TOML document플레이그라운드 열기 →import std.jsonimport std.tomlimport std.testimport std.iolet tree = test.assertOk(json.parse("7"))let value = test.assertOk(toml.fromJson(tree))match (toml.stringify(value)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("root table required")}
기대 출력종료 코드 0
root table required
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Convert a TOML table through a recoverable JSON result
run · running · 검증 · 미실행
main.tpzConvert a TOML table through a recoverable JSON resultimport std.jsonimport std.tomlimport std.testimport std.iolet value = test.assertOk(toml.parse("name = \"Topaz\"\ncount = 6\n"))let tree = test.assertOk(value.toJson())io.writeLine(test.assertOk(json.stringify(tree)))let restored = test.assertOk(toml.fromJson(tree))io.writeLine(test.assertOk(toml.stringify(restored)))
기대 출력종료 코드 0
{"count":6,"name":"Topaz"}
count = 6
name = "Topaz"
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력{"count":6,"name":"Topaz"}count = 6name = "Topaz"
이 예제는 아직 실행하지 않았습니다.
Return an error for a TOML infinity during JSON conversion
run · running · 검증 · 미실행
main.tpzReturn an error for a TOML infinity during JSON conversion플레이그라운드 열기 →import std.tomlimport std.testimport std.iolet value = test.assertOk(toml.parse("value = inf\n"))match (value.toJson()) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("nonfinite rejected")}
기대 출력종료 코드 0
nonfinite rejected
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject null and out of range integer conversion
run · running · 검증 · 미실행
main.tpzReject null and out of range integer conversion플레이그라운드 열기 →import std.jsonimport std.tomlimport std.testimport std.iofor text in (["null", "9223372036854775808", "1e9999"]) { let value = test.assertOk(json.parse(text)) match (toml.fromJson(value)) { case Ok(_) => io.writeLine("accepted") case Err(_) => io.writeLine("unrepresentable") }}
기대 출력종료 코드 0
unrepresentable
unrepresentable
unrepresentable
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력unrepresentableunrepresentableunrepresentable
이 예제는 아직 실행하지 않았습니다.
이유
데이터를 조용히 바꾸는 대신 호출자가 변환할 수 없는 값을 처리할 수 있습니다.
바뀐 규칙 Parse complete TOML 1.0 documents →Write deterministic TOML documents →Convert TOML and JSON with explicit failures →
테스트 반복은 일반 for를 씁니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
정수나 불리언 케이스를 반복하는 테스트가 있습니다. 같은 케이스를 표준 반복문으로도 실행할 수 있습니다.
결정
forAllInt와 forAllBool을 없애고 일반 for를 사용합니다.
예제
Use one loop for every element type
run · running · 검증 · 미실행
main.tpzUse one loop for every element type플레이그라운드 열기 →import std.testimport std.iolet mut sum = 0for value in ([2, 3, 5]) { sum += value}let mut trueCount = 0for value in ([true, false, true]) { if (value) { trueCount += 1 }}let mut labels = ""for value in (["A", "B", "C"]) { labels = labels + value}test.assertEq(sum, 10)test.assertEq(trueCount, 2)test.assertEq(labels, "ABC")io.writeLine("all values checked")
기대 출력종료 코드 0
all values checked
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject the removed forAllInt helper
reject · checking · 검증 · 미실행
main.tpzReject the removed forAllInt helper플레이그라운드 열기 →import std.test { forAllInt }
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 resolve. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject the removed forAllBool helper
reject · checking · 검증 · 미실행
main.tpzReject the removed forAllBool helper플레이그라운드 열기 →import std.test { forAllBool }
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 resolve. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 테스트 전용 반복 함수를 유지한다. 같은 반복을 두 형태로 표현하게 됩니다.
이유
테스트에도 다른 코드와 같은 반복 규칙을 적용할 수 있습니다.
바뀐 규칙 Repeat assertions with for →
파서 검색은 유니코드 스칼라 위치를 씁니다
2026년 11월 7일 채택 · 6.0.0 · 확인 중
문제
ASCII 범위를 찾는 코드도 유니코드 텍스트를 받을 수 있습니다. 시작 위치가 문자열 밖에 있거나 정수가 ASCII 범위를 벗어날 때도 결과를 정해야 합니다.
결정
- 정수를 받는 ASCII 판정 함수는 모든 정수 입력에 결과를 돌려줍니다.
- 검색 시작을 문자열 범위 안으로 맞추고, 조건을 만족하는 가장 긴 구간 바로 뒤의 유니코드 스칼라 위치를 반환합니다.
- 인덱스로 조회하는 판정 함수와 구간 스캔은 같은 Unicode 스칼라 위치 단위를 씁니다.
예제
Include each ASCII endpoint and exclude its neighbors
run · running · 검증 · 미실행
main.tpzInclude each ASCII endpoint and exclude its neighbors플레이그라운드 열기 →import std.parserimport std.iofor cp in ([47, 48, 57, 58, 64, 65, 90, 91, 96, 97, 122, 123, 8, 9, 10, 11, 12, 13, 14, 31, 32, 33]) { let digit = parser.isAsciiDigitCode(cp) let alpha = parser.isAsciiAlphaCode(cp) let alnum = parser.isAsciiAlnumCode(cp) let space = parser.isAsciiWhitespaceCode(cp) io.writeLine("{digit}/{alpha}/{alnum}/{space}")}
기대 출력종료 코드 0
false/false/false/false
true/false/true/false
true/false/true/false
false/false/false/false
false/false/false/false
false/true/true/false
false/true/true/false
false/false/false/false
false/false/false/false
false/true/true/false
false/true/true/false
false/false/false/false
false/false/false/false
false/false/false/true
false/false/false/true
false/false/false/true
false/false/false/true
false/false/false/true
false/false/false/false
false/false/false/false
false/false/false/true
false/false/false/false
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력false/false/false/falsetrue/false/true/falsetrue/false/true/falsefalse/false/false/falsefalse/false/false/falsefalse/true/true/falsefalse/true/true/falsefalse/false/false/falsefalse/false/false/falsefalse/true/true/falsefalse/true/true/falsefalse/false/false/falsefalse/false/false/falsefalse/false/false/truefalse/false/false/truefalse/false/false/truefalse/false/false/truefalse/false/false/truefalse/false/false/falsefalse/false/false/falsefalse/false/false/truefalse/false/false/false
이 예제는 아직 실행하지 않았습니다.
Return false for invalid code points and non ASCII values
run · running · 검증 · 미실행
main.tpzReturn false for invalid code points and non ASCII values플레이그라운드 열기 →import std.parserimport std.iofor cp in ([-1, 128, 233, 55296, 1114112, 9223372036854775807]) { let digit = parser.isAsciiDigitCode(cp) let alpha = parser.isAsciiAlphaCode(cp) let alnum = parser.isAsciiAlnumCode(cp) let space = parser.isAsciiWhitespaceCode(cp) io.writeLine("{digit}/{alpha}/{alnum}/{space}")}
기대 출력종료 코드 0
false/false/false/false
false/false/false/false
false/false/false/false
false/false/false/false
false/false/false/false
false/false/false/false
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력false/false/false/falsefalse/false/false/falsefalse/false/false/falsefalse/false/false/falsefalse/false/false/falsefalse/false/false/false
이 예제는 아직 실행하지 않았습니다.
Stop at non ASCII scalars without changing position units
run · running · 검증 · 미실행
main.tpzStop at non ASCII scalars without changing position units플레이그라운드 열기 →import std.parserimport std.iolet digit = parser.takeWhileAsciiDigit("é12x", 1)let combining = parser.takeWhileAsciiAlpha("éA", 0)let suffix = parser.takeWhileAsciiAlpha("éA", 2)let nonbreaking = parser.takeWhileAsciiWhitespace(" ", 0)let alnum = parser.takeWhileAsciiAlnum("Aé", 0)io.writeLine("{digit}/{combining}/{suffix}/{nonbreaking}/{alnum}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Clamp starts and keep the first failing position
run · running · 검증 · 미실행
main.tpzClamp starts and keep the first failing position플레이그라운드 열기 →import std.parserimport std.iolet text = "12"for start in ([-3, 0, 1, 2, 99]) { let digit = parser.takeWhileAsciiDigit(text, start) let alpha = parser.takeWhileAsciiAlpha(text, start) let alnum = parser.takeWhileAsciiAlnum(text, start) let space = parser.takeWhileAsciiWhitespace(text, start) io.writeLine("{digit}/{alpha}/{alnum}/{space}")}let empty = ""let digit = parser.takeWhileAsciiDigit(empty, 99)let alpha = parser.takeWhileAsciiAlpha(empty, -1)let alnum = parser.takeWhileAsciiAlnum(empty, 0)let space = parser.takeWhileAsciiWhitespace(empty, 1)io.writeLine("{digit}/{alpha}/{alnum}/{space}")
기대 출력종료 코드 0
2/0/2/0
2/0/2/0
2/1/2/1
2/2/2/2
2/2/2/2
0/0/0/0
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력2/0/2/02/0/2/02/1/2/12/2/2/22/2/2/20/0/0/0
이 예제는 아직 실행하지 않았습니다.
이유
반환된 끝 위치를 다음 검색의 시작으로 쓸 수 있습니다.
바뀐 규칙 Classify integer ASCII codes →Classify a scalar position →Scan a maximal ASCII span →
격자 포인트로 변환하는 메서드는 toScaledPoints입니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
길이 값에서 정수 격자 값을 얻는 연산은 단순 조회로 보일 수 있습니다. 변환임을 이름에서 알 수 있게 합니다.
결정
scaledPoints 대신 toScaledPoints를 씁니다.
예제
Convert every physical length unit to scaled points
run · running · 검증 · 미실행
main.tpzConvert every physical length unit to scaled pointsimport std.ioimport std.typeset as tslet pt = (1pt).toScaledPoints()let mm = (25.4mm).toScaledPoints()let cm = (2.54cm).toScaledPoints()let inch = (1in).toScaledPoints()io.writeLine("{pt}|{mm}|{cm}|{inch}|{ts.fromScaledPoints(pt) == 1pt}")
기대 출력종료 코드 0
65536|4718592|4718592|4718592|true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력65536|4718592|4718592|4718592|true
이 예제는 아직 실행하지 않았습니다.
Keep the millipoint conversion boundary
run · running · 검증 · 미실행
main.tpzKeep the millipoint conversion boundary플레이그라운드 열기 →import std.ioimport std.typeset as tslet tie = ts.fromScaledPoints(4096).toMilliPoints()let rounded = ts.fromMilliPoints(1) == ts.fromScaledPoints(66)io.writeLine("{tie}|{rounded}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 두 이름을 유지한다. 동일한 변환에 호출 이름이 둘 남습니다.
이유
변환 메서드라는 뜻이 다른 to 메서드와 같은 방식으로 드러납니다.
바뀐 규칙 Convert physical lengths with toScaledPoints →
조판의 공개 물리 거리는 Length<Pt>입니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
줄 너비나 들여쓰기를 정수로 넘기면 어느 격자 단위인지 호출마다 알아야 합니다. 격자를 바꾸더라도 문단 거리 자체는 같은 값을 나타내야 합니다.
결정
std.typeset의 공개 물리 거리는 Length<Pt>로 씁니다. 계산에 들어갈 때만 격자로 변환합니다.
예제
Use point lengths in Box
check · checking · 검증 · 미실행
main.tpzUse point lengths in Boximport std.typeset as tslet value: ts.Box = ts.Box { unitIndex: 0, text: "A", width: 12pt, trackingAfter: 0pt}let distance: Length<Pt> = value.width
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject untyped physical distances in Box
reject · checking · 검증 · 미실행
main.tpzReject untyped physical distances in Boximport std.typeset as tslet value: ts.Box = ts.Box { unitIndex: 0, text: "A", width: 12, trackingAfter: 0}
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Pass typed distances to the line-cost function
check · checking · 검증 · 미실행
main.tpzPass typed distances to the line-cost functionimport std.typeset as tslet value = ts.lineBadness(20pt, 20pt, 4, 1, ts.BreakKind.ForcedEnd(), false, 0, 0pt)
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject raw distances at the line-cost boundary
reject · checking · 검증 · 미실행
main.tpzReject raw distances at the line-cost boundaryimport std.typeset as tslet value = ts.lineBadness(20, 20, 4, 1, ts.BreakKind.ForcedEnd(), false, 0, 0)
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Use point lengths in BreakCluster
check · checking · 검증 · 미실행
main.tpzUse point lengths in BreakClusterimport std.typeset as tslet value: ts.BreakCluster = ts.BreakCluster { text: "A", advance: 12pt, trackingAfter: 0pt}let distance: Length<Pt> = value.advance
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject untyped physical distances in BreakCluster
reject · checking · 검증 · 미실행
main.tpzReject untyped physical distances in BreakClusterimport std.typeset as tslet value: ts.BreakCluster = ts.BreakCluster { text: "A", advance: 12, trackingAfter: 0}
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 격자 단위의 정수를 API에 그대로 둔다. 호출마다 정수의 단위와 변환 시점을 따로 알아야 합니다.
이유
거리의 단위가 타입에 있고 계산 격자는 내부 선택으로 남습니다.
바뀐 규칙 Give public typesetting distances a point-length type →
한중일 클러스터 분류의 이름은 CjkCluster입니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
기존 이름만 보면 한국어에 한정한 분류처럼 읽혔습니다. 실제로는 같은 규칙으로 처리하는 한중일 경계가 있습니다.
결정
KoreanCluster를 실제 분류 범위를 나타내는 CjkCluster로 바꿉니다.
예제
Use the CJK cluster variant
check · checking · 검증 · 미실행
main.tpzUse the CJK cluster variantimport std.typeset as tslet kind: ts.BreakKind = ts.BreakKind.CjkCluster()
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Reject the former KoreanCluster name
reject · checking · 검증 · 미실행
main.tpzReject the former KoreanCluster nameimport std.typeset as tslet kind = ts.BreakKind.KoreanCluster()
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 기존 이름을 유지한다. 한중일 클러스터를 처리하는 분류의 범위를 이름에서 알기 어렵습니다.
이유
분류가 적용되는 범위가 이름에 드러납니다.
바뀐 규칙 Name the CJK cluster break category →
빈 마지막 줄에도 52퍼센트 기준을 적용합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
아무 글자도 없는 마지막 줄이 다른 짧은 마지막 줄과 다른 비용 규칙을 따를 수 있었습니다. 빈 결과를 계산할 때도 같은 기준이 필요합니다.
결정
마지막 줄이 52퍼센트 미만인지 글자 수가 0이어도 검사합니다. 빈 마지막 줄의 비용은 1185000000입니다.
예제
Apply the last-line width condition to zero characters
run · running · 검증 · 미실행
main.tpzApply the last-line width condition to zero charactersimport std.typeset as tsimport std.testimport std.iofunction show(value: Result<int, ts.TypesetError>) -> () { let cost = test.assertOk(value) io.writeLine("{cost}")}show(ts.lineBadness(0pt, 100pt, 0, 0, ts.BreakKind.ForcedEnd(), true, 0, 0pt))
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Use a strict last-line width threshold
run · running · 검증 · 미실행
main.tpzUse a strict last-line width thresholdimport std.typeset as tsimport std.testimport std.iofunction show(value: Result<int, ts.TypesetError>) -> () { let cost = test.assertOk(value) io.writeLine("{cost}")}show(ts.lineBadness(52pt, 100pt, 4, 0, ts.BreakKind.ForcedEnd(), true, 0, 0pt))show(ts.lineBadness(51pt, 100pt, 4, 0, ts.BreakKind.ForcedEnd(), true, 0, 0pt))
기대 출력종료 코드 0
102160000
606040000
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 글자가 하나 이상일 때만 기준을 적용한다. 빈 마지막 줄만 별도의 비용 계산을 따릅니다.
이유
같은 마지막 줄 기준을 빈 입력에도 그대로 사용할 수 있습니다.
바뀐 규칙 Compute fixed-point line badness from point lengths →
줄 비용 함수의 이름은 lineBadness입니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
호출 이름에 밀리포인트가 들어 있으면 길이 타입을 받는 함수도 정수 격자 값을 요구하는 것처럼 읽힙니다. 단위는 타입에서 확인할 수 있습니다.
결정
lineBadnessMpt의 이름을 lineBadness로 바꿉니다.
예제
Compute a line cost from point lengths
run · running · 검증 · 미실행
main.tpzCompute a line cost from point lengthsimport std.ioimport std.typeset as tslet cost = ts.lineBadness(20pt, 20pt, 4, 1, ts.BreakKind.ForcedEnd(), false, 0, 0pt)match (cost) { case Ok(value) => io.writeLine("{value}") case Err(_) => io.writeLine("unexpected input error")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject the former millipoint function name
reject · checking · 검증 · 미실행
main.tpzReject the former millipoint function nameimport std.typeset { lineBadnessMpt }
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 resolve. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 밀리포인트가 붙은 이름을 유지한다. 함수 이름과 길이 타입이 서로 다른 단위를 말하는 것처럼 보입니다.
이유
단위를 확인할 때 함수 이름에 붙은 옛 표현을 해석할 필요가 없습니다.
바뀐 규칙 Compute fixed-point line badness from point lengths →
최대 자간은 글꼴에 상대적인 길이로 씁니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
자간을 실수 배율로만 받으면 길이를 뜻하는지 다른 비율을 뜻하는지 값에서 알기 어렵습니다. 물리 자간은 선택한 글꼴의 크기로 계산합니다.
결정
maxLetterSpacingEm은 Length<Em>을 받습니다.Length<Pt>인 글꼴 크기로 해석한 뒤 격자로 변환합니다. 밀리포인트의 정확한 중간값은 가까운 짝수로 반올림합니다.
예제
Store a relative spacing length and an explicit point font size
check · checking · 검증 · 미실행
main.tpzStore a relative spacing length and an explicit point font sizeimport std.typeset as tslet value = ts.LatinSpacing { minWordSpaceRatio: 0.8, maxWordSpaceRatio: 1.33, maxLetterSpacingEm: 0.01em, fontSizePt: 12pt}let relative: Length<Em> = value.maxLetterSpacingEmlet physical: Length<Pt> = relative.resolve(value.fontSizePt)
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 오류 출력 없음.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
Resolve the stored spacing before converting to the computation grid
run · running · 검증 · 미실행
main.tpzResolve the stored spacing before converting to the computation gridimport std.typeset as tsimport std.iolet spacing = ts.LatinSpacing { minWordSpaceRatio: 0.8, maxWordSpaceRatio: 1.33, maxLetterSpacingEm: 0.01em, fontSizePt: 12pt}let limit = spacing.maxLetterSpacingEm.resolve(spacing.fontSizePt)let exact = limit == ts.fromScaledPoints(7860)let millipoints = limit.toMilliPoints()io.writeLine("{exact}|{millipoints}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Apply nearest-even rounding at each typed value boundary
run · running · 검증 · 미실행
main.tpzApply nearest-even rounding at each typed value boundary플레이그라운드 열기 →import std.typeset as tsimport std.iolet lowTie = (0.5em).resolve(ts.fromScaledPoints(3)) == ts.fromScaledPoints(2)let highTie = (0.5em).resolve(ts.fromScaledPoints(5)) == ts.fromScaledPoints(2)let literalGrid = (0.01em).resolve(12pt) == ts.fromScaledPoints(7860)let gridLow = (0.5em).resolve(0.125pt).toMilliPoints()let gridHigh = (0.5em).resolve(0.375pt).toMilliPoints()io.writeLine("{lowTie}|{highTie}|{literalGrid}|{gridLow}|{gridHigh}")
기대 출력종료 코드 0
true|true|true|62|188
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject an untyped multiplier in the relative-length field
reject · checking · 검증 · 미실행
main.tpzReject an untyped multiplier in the relative-length fieldimport std.typeset as tslet spacing = ts.LatinSpacing { minWordSpaceRatio: 0.8, maxWordSpaceRatio: 1.33, maxLetterSpacingEm: 0.01, fontSizePt: 12pt}
기대 출력0이 아닌 종료 코드
표준 출력 없음.
기대 결과
기대 결과
거절 단계 check. 종료 코드가 0이 아닙니다.
표준 출력 없음.
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 상대 자간을 실수 배율로 둔다. 길이와 차원 없는 비율을 같은 타입으로 구별해야 합니다.
이유
상대 자간이 어떤 크기의 글꼴에 적용되는지 단위를 포함해서 읽을 수 있습니다.
바뀐 규칙 Resolve relative letter spacing through Length →
같은 조판 조건에서는 같은 줄 경계를 고릅니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
계획 후보의 비용이 같으면 어느 줄을 택할지 정해야 합니다. 선택이 실행마다 달라지면 같은 원고도 결과가 바뀔 수 있습니다.
결정
- 입력 순서, 정책, 계산 격자, 제품 판이 같으면 줄 경계와 종류, 너비와 비용, 오류 종류가 같습니다.
- 비용이 같은 후보의 선택 순서를 정합니다.
예제
Retain a deterministic choice among equal cost candidates
run · running · 검증 · 미실행
main.tpzRetain a deterministic choice among equal cost candidatesimport std.typeset as tsimport std.ioimport std.testlet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "word", width: 10pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Allowed(0), kind: ts.BreakKind.LatinSpace(), flagged: false }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Allowed(0), kind: ts.BreakKind.ClosingPunctuation(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}function category(kind: ts.BreakKind) -> string { match (kind) { case LatinSpace() => "space" case ClosingPunctuation() => "punctuation" case _ => "unexpected kind" }}for pass in ([0, 1]) { let result = test.assertOk(ts.breakParagraph(input)) let optimized = result.optimized.lines[0] let greedy = result.greedy.lines[0] io.writeLine("{pass} {optimized.start} {optimized.endExclusive} {category(optimized.kind)} {category(greedy.kind)}")}
기대 출력종료 코드 0
0 0 1 space punctuation
1 0 1 space punctuation
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력0 0 1 space punctuation1 0 1 space punctuation
이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzReport the same first failing stage for repeated invalid inputimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 2, text: "a", width: 1pt, trackingAfter: 0pt })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 0pt, firstTarget: 0pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}for pass in ([0, 1]) { match (ts.breakParagraph(input)) { case Err(InvalidPolicy(_)) => io.writeLine("{pass} InvalidPolicy") case _ => io.writeLine("unexpected result") }}
기대 출력종료 코드 0
0 InvalidPolicy
1 InvalidPolicy
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력0 InvalidPolicy1 InvalidPolicy
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 실행마다 다른 계획을 골라도 허용한다. 같은 원고에서 줄바꿈이나 오류가 달라질 수 있습니다.
이유
같은 조건에서 얻은 계획을 다시 확인할 수 있습니다.
바뀐 규칙 Repeat a paragraph plan deterministically →
줄바꿈 분류와 문단 계획은 서로 다른 경계를 다룹니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
문자 사이에서 줄을 끊을 수 있는지와 어느 지점을 줄 끝으로 고를지는 다른 판단입니다. 같은 격자를 쓰면 분류의 기준값도 계획 설정의 영향을 받습니다.
결정
classifyBreaks는 저장한 포인트 틱으로 비교합니다. 문단 계획에서만 Paragraph.grid로 양자화합니다.BreakKind는 분류, BreakRule은 계획 제약입니다. 변경할 수 없는 유니코드 결정이 우선하며 셰이핑과 충돌하면 입력 오류입니다.
예제
Keep exact point measurements at the classifier boundary
run · running · 검증 · 미실행
main.tpzKeep exact point measurements at the classifier boundaryimport std.typeset as tsimport std.testimport std.iolet clusters = [ ts.BreakCluster { text: "a", advance: 0.5002pt, trackingAfter: 0pt }, ts.BreakCluster { text: "b", advance: 0.5002pt, trackingAfter: 0pt }]let policy = ts.BreakPolicy { mode: ts.BreakMode.Word(), rules: ts.KinsokuRules.AtlasDefault(), forbidBefore: [], forbidAfter: [], boundaryAllowed: [true, true], generatedHyphenEnds: [], protectFittingLatin: false, preserveShortWords: false, narrowestWordTarget: 0pt, bodyWordTarget: 1pt}let result = test.assertOk(ts.classifyBreaks(clusters, policy))for boundary in (result) { io.writeLine("{boundary.unitEnd}")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject a cluster that hides a mandatory Unicode break
run · running · 검증 · 미실행
main.tpzReject a cluster that hides a mandatory Unicode breakimport std.typeset as tsimport std.ioimport std.testfunction outcome(value: Result<Array<ts.BreakOpportunity>, ts.TypesetError>) -> string { match (value) { case Ok(_) => "Ok" case Err(InvalidInput(_)) => "InvalidInput" case Err(InvalidPolicy(_)) => "InvalidPolicy" case Err(_) => "unexpected error" }}let clusters = [ts.BreakCluster { text: "A\nB", advance: 1pt, trackingAfter: 0pt }]let selected = ts.BreakPolicy { mode: ts.BreakMode.Character(), rules: ts.KinsokuRules.Unicode16Ja(), forbidBefore: [], forbidAfter: [], boundaryAllowed: [true], generatedHyphenEnds: [], protectFittingLatin: false, preserveShortWords: false, narrowestWordTarget: 0pt, bodyWordTarget: 0pt}io.writeLine(outcome(ts.classifyBreaks(clusters, selected)))
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Keep signed penalty preferences distinct from hard break rules
run · running · 검증 · 미실행
main.tpzKeep signed penalty preferences distinct from hard break rules플레이그라운드 열기 →import std.typeset as tsimport std.ioimport std.testlet rules = [ts.BreakRule.Allowed(-10000), ts.BreakRule.Allowed(0), ts.BreakRule.Allowed(10000)]for rule in (rules) { match (rule) { case Allowed(value) => io.writeLine("{value}") case _ => io.writeLine("unexpected rule") }}
기대 출력종료 코드 0
-10000
0
10000
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 분류와 계획 제약을 한 단계로 다룬다. 계획에 선택한 제약이 원래의 문자 경계 판정과 섞입니다.
이유
분류 기준을 확인한 뒤 별도의 문단 비용과 제약으로 줄을 고를 수 있습니다.
바뀐 규칙 Classify measured clusters into an ordered boundary sequence →Keep boundary policy separate from break category →Express preference, mandatory breaks, and forbidden breaks explicitly →
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
필터링이나 편집 뒤에는 클러스터나 문단이 비어 있을 수 있습니다. 비었다는 이유로 실패하면 호출자가 결과를 따로 만들어야 합니다.
결정
다른 조건이 유효하면 빈 클러스터 배열과 빈 문단은 빈 결과로 성공합니다.
예제
Classify an empty cluster sequence
run · running · 검증 · 미실행
main.tpzClassify an empty cluster sequenceimport std.typeset as tsimport std.ioimport std.testlet clusters: Array<ts.BreakCluster> = []let selected = ts.BreakPolicy { mode: ts.BreakMode.Character(), rules: ts.KinsokuRules.AtlasDefault(), forbidBefore: [], forbidAfter: [], boundaryAllowed: [], generatedHyphenEnds: [], protectFittingLatin: false, preserveShortWords: false, narrowestWordTarget: 0pt, bodyWordTarget: 0pt}let breaks = test.assertOk(ts.classifyBreaks(clusters, selected))io.writeLine("{breaks.length}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Plan a valid empty paragraph
run · running · 검증 · 미실행
main.tpzPlan a valid empty paragraphimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Ok(result) => { io.writeLine("{result.optimized.lines.length} {result.greedy.lines.length}") io.writeLine("{result.optimized.totalCost} {result.greedy.totalCost} {result.breakOpportunityCount}") } case Err(_) => io.writeLine("unexpected error")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 빈 입력을 오류로 처리한다. 호출자는 같은 계산을 요청하기 전에 입력이 빈 경우를 따로 처리해야 합니다.
이유
빈 상태도 결과를 조립하는 일반 경로에 놓을 수 있습니다.
바뀐 규칙 Classify measured clusters into an ordered boundary sequence →Choose deterministic paragraph plans →
비어 있지 않은 문단은 마지막 셰이핑 경계를 허용해야 합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
셰이핑 결과가 마지막 지점을 줄 끝으로 쓰지 못하게 표시할 수 있습니다. 규칙 묶음마다 받아들이는 조건이 다르면 같은 입력의 유효성이 달라집니다.
결정
비어 있지 않은 입력의 마지막 셰이핑 경계는 모든 규칙 묶음에서 허용되어야 합니다. 위반하면 InvalidInput입니다.
예제
Reject a masked paragraph end in every ruleset
run · running · 검증 · 미실행
main.tpzReject a masked paragraph end in every rulesetimport std.typeset as tsimport std.ioimport std.testfunction outcome(value: Result<Array<ts.BreakOpportunity>, ts.TypesetError>) -> string { match (value) { case Ok(_) => "Ok" case Err(InvalidInput(_)) => "InvalidInput" case Err(InvalidPolicy(_)) => "InvalidPolicy" case Err(_) => "unexpected error" }}let clusters = [ts.BreakCluster { text: "a", advance: 1pt, trackingAfter: 0pt }]let atlas = ts.BreakPolicy { mode: ts.BreakMode.Character(), rules: ts.KinsokuRules.AtlasDefault(), forbidBefore: [], forbidAfter: [], boundaryAllowed: [false], generatedHyphenEnds: [], protectFittingLatin: false, preserveShortWords: false, narrowestWordTarget: 0pt, bodyWordTarget: 0pt}let unicode = ts.BreakPolicy { mode: ts.BreakMode.Character(), rules: ts.KinsokuRules.Unicode16Ja(), forbidBefore: [], forbidAfter: [], boundaryAllowed: [false], generatedHyphenEnds: [], protectFittingLatin: false, preserveShortWords: false, narrowestWordTarget: 0pt, bodyWordTarget: 0pt}io.writeLine(outcome(ts.classifyBreaks(clusters, atlas)))io.writeLine(outcome(ts.classifyBreaks(clusters, unicode)))
기대 출력종료 코드 0
InvalidInput
InvalidInput
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 규칙 묶음마다 마지막 경계를 다르게 처리한다. 같은 셰이핑 자료가 어떤 경로에서는 되고 다른 경로에서는 실패합니다.
이유
문단을 끝낼 수 있는 조건을 한 곳에서 확인할 수 있습니다.
바뀐 규칙 Classify measured clusters into an ordered boundary sequence →
문단 계획은 탐색 범위와 두 결과를 명시합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
좋은 줄바꿈이라고만 쓰면 어떤 후보를 비교했는지 알 수 없습니다. 같은 문단을 계산해도 빠른 선택과 후보 비교가 다른 결과에 닿을 수 있습니다.
결정
- FixedPoint는 앞선 후보 80개부터 탐색을 넓힙니다. KnuthPlass는 모든 선행 후보를 검토합니다. 수용 조건과 비용 규칙을 각각 적용합니다.
- 한 호출이 최적화한 결과와 그리디 결과를 돌려줍니다.
예제
Plan a paragraph through its supplied boundaries
run · running · 검증 · 미실행
main.tpzPlan a paragraph through its supplied boundariesimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 2, width: 0pt, rule: ts.BreakRule.Allowed(0), kind: ts.BreakKind.LatinSpace(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 2, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.BoxItem(ts.Box { unitIndex: 3, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 4, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 2pt, firstTarget: 2pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Ok(result) => { for line in (result.optimized.lines) { io.writeLine("{line.start} {line.endExclusive}") } io.writeLine("{result.greedy.lines.length} {result.breakOpportunityCount}") } case Err(_) => io.writeLine("unexpected error")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Report a missing greedy completion
run · running · 검증 · 미실행
main.tpzReport a missing greedy completionimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Allowed(0), kind: ts.BreakKind.ForcedEnd(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Err(NoGreedyPlan()) => io.writeLine("NoGreedyPlan") case _ => io.writeLine("unexpected result")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Report three forced soft hyphens in a row
run · running · 검증 · 미실행
main.tpzReport three forced soft hyphens in a rowimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.LatinSoftHyphen(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 2, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.LatinSoftHyphen(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 2, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 3, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.LatinSoftHyphen(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 1pt, firstTarget: 1pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Err(NoPlan()) => io.writeLine("NoPlan") case _ => io.writeLine("unexpected result")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 탐색 범위를 말하지 않고 최적이라고만 한다. 어떤 후보 사이에서 얻은 결과인지 비교할 수 없습니다.
이유
프로그램은 계산한 두 결과를 같은 호출에서 비교할 수 있습니다.
바뀐 규칙 Choose deterministic paragraph plans →
조판은 음수 물리 너비를 거절하고 음수 자간은 허용합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
폭과 자간은 모두 거리로 표현되지만 음수의 의미가 다릅니다. 음수 폭을 무시하면 실제 줄 길이가 어떻게 계산됐는지 알기 어렵습니다.
결정
음수 물리 크기, 페널티 너비, 드롭캡 안쪽 여백은 거절합니다. 자간 조정값에는 음수를 허용합니다.
예제
Reject negative widths and negative extents before tracking
run · running · 검증 · 미실행
main.tpzReject negative widths and negative extents before trackingimport std.typeset as tsimport std.iofunction report(items: Array<ts.Item>) -> () { let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 } } match (ts.breakParagraph(input)) { case Err(InvalidInput(_)) => io.writeLine("InvalidInput") case _ => io.writeLine("unexpected result") }}report([ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: -1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })])report([ts.Item.GlueItem(ts.Glue { unitIndex: 0, text: " ", width: -1pt, trackingAfter: 0pt, stretch: 0pt, shrink: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })])report([ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 2pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })])report([ts.Item.GlueItem(ts.Glue { unitIndex: 0, text: " ", width: 1pt, trackingAfter: 2pt, stretch: 0pt, shrink: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })])
기대 출력종료 코드 0
InvalidInput
InvalidInput
InvalidInput
InvalidInput
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력InvalidInputInvalidInputInvalidInputInvalidInput
이 예제는 아직 실행하지 않았습니다.
Keep measured units and signed tracking in source order
run · running · 검증 · 미실행
main.tpzKeep measured units and signed tracking in source orderimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.PenaltyItem(ts.Penalty { unitEnd: 3, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "AB", width: 3pt, trackingAfter: 1pt }), ts.Item.GlueItem(ts.Glue { unitIndex: 1, text: " ", width: 2pt, trackingAfter: 0.5pt, stretch: 1pt, shrink: 1pt }), ts.Item.BoxItem(ts.Box { unitIndex: 2, text: "C", width: 4pt, trackingAfter: -1pt })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Ok(result) => { let line = result.optimized.lines[0] io.writeLine("{line.start}:{line.endExclusive}:{line.displayTextScalarLength}") io.writeLine("{line.rawTextWidth == 10pt}:{line.trimmedTextWidth == 10pt}") io.writeLine("{items.length}") match (items[0]) { case PenaltyItem(_) => io.writeLine("penalty first") case _ => io.writeLine("changed input") } } case Err(_) => io.writeLine("unexpected error")}
기대 출력종료 코드 0
0:3:4
true:true
4
penalty first
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력0:3:4true:true4penalty first
이 예제는 아직 실행하지 않았습니다.
Reject a negative boundary width
run · running · 검증 · 미실행
main.tpzReject a negative boundary widthimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: -1pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Err(InvalidInput(_)) => io.writeLine("InvalidInput") case _ => io.writeLine("unexpected result")}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Reject a negative drop cap inset
run · running · 검증 · 미실행
main.tpzReject a negative drop cap insetimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 1, dropCapInset: -1pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Err(InvalidPolicy(_)) => io.writeLine("InvalidPolicy") case _ => io.writeLine("unexpected result")}
기대 출력종료 코드 0
InvalidPolicy
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 음수 물리 너비를 허용하거나 무시한다. 측정에 들어간 잘못된 너비를 놓칠 수 있습니다.
이유
간격을 줄이는 의도와 잘못된 물리 크기를 구별할 수 있습니다.
바뀐 규칙 Preserve measured units and validate their physical extents →Apply penalties at measured unit boundaries →Compute each line target from one geometry →
선택한 페널티의 너비는 줄 너비에 포함됩니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
줄 끝에서 추가한 조각에는 폭이 있을 수 있습니다. 비용 방식마다 그 폭을 다루는 법이 다르면 같은 줄을 다른 폭으로 계산합니다.
결정
선택된 페널티의 너비는 모든 종류와 두 계산 방식에서 반영하며 정렬할 때의 자연 너비에도 넣습니다.
예제
Include a selected nonsoft penalty width with fixed costs
run · running · 검증 · 미실행
main.tpzInclude a selected nonsoft penalty width with fixed costsimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 4pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 1pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.LatinHyphen(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 5pt, firstTarget: 5pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Ok(result) => { let line = result.optimized.lines[0] io.writeLine("{line.selectedPenaltyWidth == 1pt}:{line.costTextWidth == 4pt}:{line.cost}") } case Err(_) => io.writeLine("unexpected error")}
기대 출력종료 코드 0
true:true:350000000
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Include a selected nonsoft penalty width with knuth costs
run · running · 검증 · 미실행
main.tpzInclude a selected nonsoft penalty width with knuth costsimport std.typeset as tsimport std.iolet items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 4pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 1pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.LatinHyphen(), flagged: false })]let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 5pt, firstTarget: 5pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.Unjustified(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.KnuthPlass(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 }}match (ts.breakParagraph(input)) { case Ok(result) => { let line = result.optimized.lines[0] io.writeLine("{line.selectedPenaltyWidth == 1pt}:{line.costTextWidth == 4pt}:{line.cost}") } case Err(_) => io.writeLine("unexpected error")}
기대 출력종료 코드 0
true:true:100
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Include an inserted width in justification without adding gaps
run · running · 검증 · 미실행
main.tpzInclude an inserted width in justification without adding gapsimport std.typeset as tsimport std.ioimport std.testfunction sample(textWidth: Length<Pt>, insertionWidth: Length<Pt>) -> ts.ParagraphResult { let items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: textWidth, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: insertionWidth, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.LatinHyphen(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "tail", width: 5pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 2, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }) ] let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 5pt, firstTarget: 5pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.LatinWordSpace(), minGapCount: 0, minLineWidthRatioM: 1000, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 } } test.assertOk(ts.breakParagraph(input))}let inserted = sample(4pt, 1pt)let measured = sample(5pt, 0pt)io.writeLine("{inserted.optimized.lines[0].cost == measured.optimized.lines[0].cost}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 일부 페널티 종류에서 너비를 무시한다. 같은 줄 끝의 조각이 한 방식에서만 줄 길이를 바꿉니다.
이유
줄 선택과 정렬이 같은 물리 너비를 기준으로 삼습니다.
바뀐 규칙 Apply penalties at measured unit boundaries →Score justification with explicit policy precedence →
최소 마지막 줄 너비는 마지막 FixedPoint 줄에만 적용합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
마지막 줄의 설정이 문단 앞쪽 줄까지 바꾸면 줄 하나를 고치려다 조판 전체가 달라질 수 있습니다. 부족한 너비도 비용을 줄여서는 안 됩니다.
결정
minFinalLineWidthRatioM은 마지막 FixedPoint 줄만 계산할 때 씁니다.- 최소 너비가 커도 부족량은 0 이상입니다. 기준에 못 미치는 줄이 그 때문에 더 싸지지 않습니다.
예제
Apply the final line threshold to the final line
run · running · 검증 · 미실행
main.tpzApply the final line threshold to the final lineimport std.typeset as tsimport std.ioimport std.testfunction sample(justification: ts.JustificationPolicy) -> ts.ParagraphResult { let items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "word", width: 10pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }) ] let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 20pt, firstTarget: 20pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: justification, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 } } test.assertOk(ts.breakParagraph(input))}let unconstrained = sample(ts.JustificationPolicy { mode: ts.JustificationMode.LatinWordSpace(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 })let constrained = sample(ts.JustificationPolicy { mode: ts.JustificationMode.LatinWordSpace(), minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: Some(1000), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 })io.writeLine("{constrained.optimized.lines[0].cost > unconstrained.optimized.lines[0].cost}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Keep the final line threshold out of nonfinal scoring
run · running · 검증 · 미실행
main.tpzKeep the final line threshold out of nonfinal scoringimport std.typeset as tsimport std.ioimport std.testfunction sample(justification: ts.JustificationPolicy) -> ts.ParagraphResult { let items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "word", width: 4pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "next", width: 4pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 2, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }) ] let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: justification, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 } } test.assertOk(ts.breakParagraph(input))}let ordinary = sample(ts.JustificationPolicy { mode: ts.JustificationMode.LatinWordSpace(), minGapCount: 1, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 })let finalZero = sample(ts.JustificationPolicy { mode: ts.JustificationMode.LatinWordSpace(), minGapCount: 1, minLineWidthRatioM: 0, minFinalLineWidthRatioM: Some(0), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 })io.writeLine("{ordinary.optimized.lines[0].cost == finalZero.optimized.lines[0].cost}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Raise the score when an overwide unit misses a larger minimum
run · running · 검증 · 미실행
main.tpzRaise the score when an overwide unit misses a larger minimumimport std.typeset as tsimport std.ioimport std.testfunction sample(ratio: int) -> ts.ParagraphResult { let items: Array<ts.Item> = [ ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "wide", width: 1.5pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }), ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "end", width: 1pt, trackingAfter: 0pt }), ts.Item.PenaltyItem(ts.Penalty { unitEnd: 2, width: 0pt, rule: ts.BreakRule.Forced(), kind: ts.BreakKind.ForcedEnd(), flagged: false }) ] let input = ts.Paragraph { grid: ts.DistanceGrid.MilliPoint(), items: items, geometry: ts.LineGeometry { bodyTarget: 1pt, firstTarget: 1pt, dropCapSpan: 0, dropCapInset: 0pt }, justification: ts.JustificationPolicy { mode: ts.JustificationMode.LatinWordSpace(), minGapCount: 0, minLineWidthRatioM: ratio, minFinalLineWidthRatioM: None(), maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0, latinSpacing: None(), cjkStretchRatio: 0.0 }, costModel: ts.CostModel.FixedPoint(), knuthPlass: ts.KnuthPlassPolicy { toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0, flaggedDemerit: 0, finalFlaggedDemerit: 0 } } test.assertOk(ts.breakParagraph(input))}let ordinary = sample(0)let thresholded = sample(2000)io.writeLine("{thresholded.optimized.lines[0].cost > ordinary.optimized.lines[0].cost}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 마지막 줄 설정을 비최종 줄에서도 읽는다. 끝 줄만 조정하려는 설정이 다른 줄까지 바꿉니다.
이유
마지막 줄 설정의 영향을 마지막 줄에서 확인할 수 있습니다.
바뀐 규칙 Score justification with explicit policy precedence →
소비자 산출물은 inspectConsumerArtifact로 확인합니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
두 함수가 같은 소비자 산출물 정보를 제공했습니다. 어느 함수를 불러야 하는지 이름만으로는 구별되지 않았습니다.
결정
inspectConsumerArtifact만 제공하고 같은 동작의 verifyConsumerArtifact를 없앱니다.
검토한 대안
- 두 이름을 모두 둔다. 같은 동작에 호출 이름 두 개가 남습니다.
이유
소비자 산출물을 검사할 때 사용할 함수가 하나입니다.
바뀐 규칙 Inspect and validate consumer artifacts in one call →
리스펙스 평가와 사용 검증과 증거 작업은 별도 호출입니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
한 요청에는 실행 전 검사, 평가, 그 뒤의 증거 확인이 이어질 수 있습니다. 한 호출에 모두 넣으면 어느 단계에서 결과를 얻었는지 가려집니다.
결정
6.0 API는 표준 평가와 사용 검증, 호스트 중단, 추가 증거 작업을 구별합니다.
검토한 대안
- 사용 검증과 증거 작업을 평가 호출에 합친다. 평가와 다른 단계의 성공 여부를 호출자가 구별하기 어렵습니다.
이유
필요한 작업을 선택하고 평가 결과를 별도로 다룰 수 있습니다.
바뀐 규칙 Pass values through a bounded guest boundary →Read a completed evaluation and preserve its failure class →Keep portable receipts, profile work, and authentication distinct →
리스펙스 요청은 식별한 뒤 불변 값으로 보관합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
호스트가 준 값을 요청으로 만들고 나서 원래 값을 바꿀 수 있습니다. 같은 식별자로 다른 입력을 실행하려면 요청의 의미가 흔들립니다.
결정
표준 바이트 교환과 호스트 Datum 생성은 명시적 변환 예산 안에서 정확한 값을 보존합니다. 식별한 요청은 불변 스냅숏입니다.
검토한 대안
- 호스트의 값을 그대로 공유한다. 같은 요청 식별자가 나중에 바뀐 값을 가리킬 수 있습니다.
이유
식별자에 대응하는 값을 이후 실행과 재실행에서 그대로 확인할 수 있습니다.
바뀐 규칙 Exchange exact immutable Datum values →
리스펙스 패키지는 검증을 끝낸 뒤 사용할 수 있습니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
패키지에는 함께 필요한 구성요소와 자원 계약이 있습니다. 누락된 입력을 첫 호출에서야 확인하면 실행을 시작한 뒤 실패하게 됩니다.
결정
공급된 구성요소 전체와 자원 계약을 검증한 뒤 사용할 수 있는 패키지 핸들을 돌려줍니다.
검토한 대안
- 호출할 때마다 구성요소를 다시 찾는다. 같은 패키지의 구성과 사용 가능 여부를 호출마다 다시 판단합니다.
이유
검증이 끝난 패키지를 받아 후속 작업을 시작할 수 있습니다.
바뀐 규칙 Admit complete packages without ambient authority →
리스펙스 규칙은 준비 뒤에도 전송된 출처를 다시 검증합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
한 곳에서 준비한 규칙을 다른 실행 환경으로 보낼 수 있습니다. 처음 준비했다는 사실만으로 받은 바이트가 그대로라는 뜻은 아닙니다.
결정
준비는 자체 유한 예산으로 검증된 불변 규칙을 만듭니다. 전송받은 코드는 수신한 곳에서 다시 검증합니다.
검토한 대안
- 준비한 코드를 수신할 때 재검증 없이 신뢰한다. 전송된 바이트가 검증 당시 입력과 같은지 알 수 없습니다.
이유
준비와 전송의 검증 경계가 각각 드러납니다.
바뀐 규칙 Prepare closed source and revalidate transported rules →
리스펙스는 평가 결과와 시도 오류를 구별합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
실행을 시작할 수 없었던 경우와 평가를 끝내고 언어 오류가 나온 경우가 있습니다. 둘을 같은 값으로 받으면 어느 쪽인지 호출자가 다시 추론해야 합니다.
결정
평가가 끝나면 표준 평가 결과를 돌려줍니다. 검증이나 실행이 완료를 막으면 별도 시도 오류를 돌려줍니다.
검토한 대안
- 모든 보고를 평가 결과 안에 넣는다. 평가가 실제로 끝났는지 결과 형태만으로 구별하기 어렵습니다.
이유
호출자가 실행이 끝난 경우와 시도가 막힌 경우를 구별해서 처리할 수 있습니다.
바뀐 규칙 Read a completed evaluation and preserve its failure class →
리스펙스는 요청과 출처와 실행 파일을 서로 다른 식별자로 다룹니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
같은 요청을 다른 엔진에서 실행하거나 다른 출처에서 읽을 수 있습니다. 이를 한 식별자로 합치면 무엇이 같았는지 구별하기 어렵습니다.
결정
의미 요청, 소스 출처, 엔진 바이트, 프로파일의 호스트 작업에는 각각 다른 타입의 식별자를 씁니다.
검토한 대안
- 모든 정보를 한 식별자로 합친다. 요청이 달라졌는지 실행 환경만 달라졌는지 알기 어렵습니다.
이유
요청의 동일성과 실행 근거의 동일성을 따로 확인할 수 있습니다.
바뀐 규칙 Identify source, programs, requests, artifacts, and profile work →
리스펙스 재실행은 보관한 평가 결과를 다시 대조합니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
저장한 평가를 다시 실행하려면 같은 요청이 맞는지 먼저 확인해야 합니다. 산출물이나 발급자를 검사하는 일과는 결과가 다릅니다.
결정
freshReplay는 보관된 요청을 실행 전에 검증하고 새 평가 결과가 기록과 같을 때 성공합니다.
검토한 대안
- 재실행과 산출물 검사 및 인증을 합친다. 요청을 다시 평가한 결과와 외부 확인 결과를 구분하기 어렵습니다.
이유
어느 요청을 다시 실행했고 결과가 같았는지 확인할 수 있습니다.
바뀐 규칙 Replay a complete request and compare the whole outcome →
리스펙스 평가 결과는 후속 검증과 별도로 남습니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
평가 뒤에 프로파일이나 산출물을 확인할 수 있습니다. 후속 확인에 실패했다고 해서 이미 얻은 언어 결과가 바뀌지는 않습니다.
결정
평가 결과는 보존하고 프로파일 자격, 산출물 검증, 발급자 인증을 따로 보고합니다.
검토한 대안
- 후속 작업이 거절되면 언어 결과도 지운다. 평가 결과와 별도 검증의 성공 여부를 구별하기 어렵습니다.
이유
실행 결과를 읽고 어떤 후속 확인에서 막혔는지 따로 알 수 있습니다.
바뀐 규칙 Keep portable receipts, profile work, and authentication distinct →
리스펙스의 단계마다 유한한 자원 한도가 있습니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
규칙 준비와 평가, 호스트 작업은 서로 다른 자원을 쓸 수 있습니다. 한도를 하나로 합치면 어느 단계에서 먼저 넘었는지 알기 어렵습니다.
결정
준비, 평가, 호스트 작업은 각자 완전한 유한 한도 레코드를 씁니다. 정해진 순서에서 먼저 난 자원 실패를 보존합니다.
검토한 대안
- 모든 단계에서 한도 하나를 공유한다. 어느 단계가 어떤 예산을 소진했는지 가려집니다.
이유
실패가 난 단계와 적용된 한도를 연결할 수 있습니다.
바뀐 규칙 Apply finite budgets in the declared resource order →
리스펙스 팩터리도 일반 규칙을 만듭니다
2026년 11월 8일 채택 · 6.0.0 · 확인 중
문제
생성된 팩터리가 규칙을 만들 때 어떤 입력과 예산을 썼는지 알아야 합니다. 그 규칙을 손으로 만든 규칙과 같은 방식으로 호출할 수도 있어야 합니다.
결정
생성된 팩터리는 검증된 잠금 항목과 명시적 준비 한도를 사용해 표준 불변 규칙을 만듭니다.
검토한 대안
- 팩터리로 만든 규칙에 다른 평가 의미를 둔다. 같은 규칙을 생성한 경로에 따라 다르게 실행해야 합니다.
이유
생성 방식이 달라도 준비된 규칙을 같은 절차로 평가합니다.
바뀐 규칙 Resolve generated factories through the admitted lock →
문자열은 글자 단위로도 나눌 수 있습니다
2026년 11월 7일 채택 · 6.0.0 · 구현 중
문제
화면에 한 글자로 보이는 표현이 여러 코드 포인트를 포함할 수 있습니다. 스칼라 하나씩 나누면 그 글자를 중간에서 자를 수 있습니다.
결정
string.graphemes()는 Unicode 16의 글자 단위 경계 규칙에 따라 문자열을 배열로 나눕니다.- 스칼라 API는 그대로 쓸 수 있습니다. 원래 문자열을 정규화하지 않습니다.
예제
Segment combining text, Hangul, and emoji
run · running · 검증 · 미실행
main.tpzSegment combining text, Hangul, and emojiimport std.iolet text = "é가👩💻🇰🇷"let clusters: Array<string> = text.graphemes()io.writeLine("{text.scalars().length}:{clusters.length}")io.writeLine(clusters.join("|"))io.writeLine("{clusters.join("") == text}")
기대 출력종료 코드 0
9:4
é|가|👩💻|🇰🇷
true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Keep empty text, CRLF, leading marks, and odd regional indicators distinct
run · running · 검증 · 미실행
main.tpzKeep empty text, CRLF, leading marks, and odd regional indicators distinctimport std.iofor text in (["", "\r\n", "̈́A", "🇰🇷🇯"]) { let clusters = text.graphemes() io.writeLine("{clusters.length}:{clusters.join("") == text}")}
기대 출력종료 코드 0
0:true
1:true
2:true
2:true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Preserve decomposed and precomposed text exactly
run · running · 검증 · 미실행
main.tpzPreserve decomposed and precomposed text exactlyimport std.iolet decomposed = "é"let precomposed = "é"let text = decomposed + precomposedlet clusters = text.graphemes()io.writeLine("{clusters.length}")io.writeLine("{clusters[0] == decomposed}")io.writeLine("{clusters[1] == precomposed}")io.writeLine("{clusters.join("") == text}")io.writeLine("{decomposed == precomposed}")
기대 출력종료 코드 0
2
true
true
true
false
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
run · running · 검증 · 미실행
main.tpzCheck every published Unicode 16 grapheme test rowimport std.ioimport graphemecases0import graphemecases1import graphemecases2import graphemecases3import graphemecases4import graphemecases5import graphemecases6import graphemecases7import graphemecases8import graphemecases9import graphemecases10import graphemecases11import graphemecases12import graphemecases13import graphemecases14import graphemecases15import graphemecases16import graphemecases17let mut failures = 0failures += graphemecases0.run()failures += graphemecases1.run()failures += graphemecases2.run()failures += graphemecases3.run()failures += graphemecases4.run()failures += graphemecases5.run()failures += graphemecases6.run()failures += graphemecases7.run()failures += graphemecases8.run()failures += graphemecases9.run()failures += graphemecases10.run()failures += graphemecases11.run()failures += graphemecases12.run()failures += graphemecases13.run()failures += graphemecases14.run()failures += graphemecases15.run()failures += graphemecases16.run()failures += graphemecases17.run()if (failures == 0) { io.writeLine("Unicode 16.0.0 grapheme corpus passed") }
기대 출력종료 코드 0
Unicode 16.0.0 grapheme corpus passed
graphemesupport.tpzCheck every published Unicode 16 grapheme test rowimport std.iofunction agrees(input: string, expected: Array<string>) -> bool { let actual: Array<string> = input.graphemes() if (actual.length != expected.length) { return false } if (actual.join("") != input) { return false } for index in (0..<expected.length) { if (actual[index] != expected[index]) { return false } } true}export function checkCase(line: int, input: string, expected: Array<string>) -> int { if (agrees(input, expected)) { return 0 } io.writeLine("GraphemeBreakTest line {line} failed") 1}
graphemecases0.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(25, " ", [" ", " "]) failures += checkCase(26, " ̈ ", [" ̈", " "]) failures += checkCase(27, " \r", [" ", "\r"]) failures += checkCase(28, " ̈\r", [" ̈", "\r"]) failures += checkCase(29, " \n", [" ", "\n"]) failures += checkCase(30, " ̈\n", [" ̈", "\n"]) failures += checkCase(31, " ", [" ", ""]) failures += checkCase(32, " ̈", [" ̈", ""]) failures += checkCase(33, " ", [" "]) failures += checkCase(34, " ̈", [" ̈"]) failures += checkCase(35, " 🇦", [" ", "🇦"]) failures += checkCase(36, " ̈🇦", [" ̈", "🇦"]) failures += checkCase(37, " ", [" ", ""]) failures += checkCase(38, " ̈", [" ̈", ""]) failures += checkCase(39, " ਃ", [" ਃ"]) failures += checkCase(40, " ̈ਃ", [" ̈ਃ"]) failures += checkCase(41, " ᄀ", [" ", "ᄀ"]) failures += checkCase(42, " ̈ᄀ", [" ̈", "ᄀ"]) failures += checkCase(43, " ᅠ", [" ", "ᅠ"]) failures += checkCase(44, " ̈ᅠ", [" ̈", "ᅠ"]) failures += checkCase(45, " ᆨ", [" ", "ᆨ"]) failures += checkCase(46, " ̈ᆨ", [" ̈", "ᆨ"]) failures += checkCase(47, " 가", [" ", "가"]) failures += checkCase(48, " ̈가", [" ̈", "가"]) failures += checkCase(49, " 각", [" ", "각"]) failures += checkCase(50, " ̈각", [" ̈", "각"]) failures += checkCase(51, " ः", [" ः"]) failures += checkCase(52, " ̈ः", [" ̈ः"]) failures += checkCase(53, " ऄ", [" ", "ऄ"]) failures += checkCase(54, " ̈ऄ", [" ̈", "ऄ"]) failures += checkCase(55, " ൎ", [" ", "ൎ"]) failures += checkCase(56, " ̈ൎ", [" ̈", "ൎ"]) failures += checkCase(57, " क", [" ", "क"]) failures += checkCase(58, " ̈क", [" ̈", "क"]) failures += checkCase(59, " ⌚", [" ", "⌚"]) failures += checkCase(60, " ̈⌚", [" ̈", "⌚"]) failures += checkCase(61, " ̀", [" ̀"]) failures += checkCase(62, " ̈̀", [" ̈̀"]) failures += checkCase(63, " ऀ", [" ऀ"]) failures += checkCase(64, " ̈ऀ", [" ̈ऀ"]) failures += checkCase(65, " ्", [" ्"]) failures += checkCase(66, " ्̈", [" ्̈"]) failures += checkCase(67, " ", [" "]) failures += checkCase(68, " ̈", [" ̈"]) failures += checkCase(69, " ", [" ", ""]) failures += checkCase(70, " ̈", [" ̈", ""]) failures += checkCase(71, "\r ", ["\r", " "]) failures += checkCase(72, "\r̈ ", ["\r", "̈", " "]) failures += checkCase(73, "\r\r", ["\r", "\r"]) failures += checkCase(74, "\r̈\r", ["\r", "̈", "\r"]) failures += checkCase(75, "\r\n", ["\r\n"]) failures += checkCase(76, "\r̈\n", ["\r", "̈", "\n"]) failures += checkCase(77, "\r", ["\r", ""]) failures += checkCase(78, "\r̈", ["\r", "̈", ""]) failures += checkCase(79, "\r", ["\r", ""]) failures += checkCase(80, "\r̈", ["\r", "̈"]) failures += checkCase(81, "\r🇦", ["\r", "🇦"]) failures += checkCase(82, "\r̈🇦", ["\r", "̈", "🇦"]) failures += checkCase(83, "\r", ["\r", ""]) failures += checkCase(84, "\r̈", ["\r", "̈", ""]) failures += checkCase(85, "\rਃ", ["\r", "ਃ"]) failures += checkCase(86, "\r̈ਃ", ["\r", "̈ਃ"]) failures += checkCase(87, "\rᄀ", ["\r", "ᄀ"]) failures += checkCase(88, "\r̈ᄀ", ["\r", "̈", "ᄀ"]) failures}
graphemecases1.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(89, "\rᅠ", ["\r", "ᅠ"]) failures += checkCase(90, "\r̈ᅠ", ["\r", "̈", "ᅠ"]) failures += checkCase(91, "\rᆨ", ["\r", "ᆨ"]) failures += checkCase(92, "\r̈ᆨ", ["\r", "̈", "ᆨ"]) failures += checkCase(93, "\r가", ["\r", "가"]) failures += checkCase(94, "\r̈가", ["\r", "̈", "가"]) failures += checkCase(95, "\r각", ["\r", "각"]) failures += checkCase(96, "\r̈각", ["\r", "̈", "각"]) failures += checkCase(97, "\rः", ["\r", "ः"]) failures += checkCase(98, "\r̈ः", ["\r", "̈ः"]) failures += checkCase(99, "\rऄ", ["\r", "ऄ"]) failures += checkCase(100, "\r̈ऄ", ["\r", "̈", "ऄ"]) failures += checkCase(101, "\rൎ", ["\r", "ൎ"]) failures += checkCase(102, "\r̈ൎ", ["\r", "̈", "ൎ"]) failures += checkCase(103, "\rक", ["\r", "क"]) failures += checkCase(104, "\r̈क", ["\r", "̈", "क"]) failures += checkCase(105, "\r⌚", ["\r", "⌚"]) failures += checkCase(106, "\r̈⌚", ["\r", "̈", "⌚"]) failures += checkCase(107, "\r̀", ["\r", "̀"]) failures += checkCase(108, "\r̈̀", ["\r", "̈̀"]) failures += checkCase(109, "\rऀ", ["\r", "ऀ"]) failures += checkCase(110, "\r̈ऀ", ["\r", "̈ऀ"]) failures += checkCase(111, "\r्", ["\r", "्"]) failures += checkCase(112, "\r्̈", ["\r", "्̈"]) failures += checkCase(113, "\r", ["\r", ""]) failures += checkCase(114, "\r̈", ["\r", "̈"]) failures += checkCase(115, "\r", ["\r", ""]) failures += checkCase(116, "\r̈", ["\r", "̈", ""]) failures += checkCase(117, "\n ", ["\n", " "]) failures += checkCase(118, "\n̈ ", ["\n", "̈", " "]) failures += checkCase(119, "\n\r", ["\n", "\r"]) failures += checkCase(120, "\n̈\r", ["\n", "̈", "\r"]) failures += checkCase(121, "\n\n", ["\n", "\n"]) failures += checkCase(122, "\n̈\n", ["\n", "̈", "\n"]) failures += checkCase(123, "\n", ["\n", ""]) failures += checkCase(124, "\n̈", ["\n", "̈", ""]) failures += checkCase(125, "\n", ["\n", ""]) failures += checkCase(126, "\n̈", ["\n", "̈"]) failures += checkCase(127, "\n🇦", ["\n", "🇦"]) failures += checkCase(128, "\n̈🇦", ["\n", "̈", "🇦"]) failures += checkCase(129, "\n", ["\n", ""]) failures += checkCase(130, "\n̈", ["\n", "̈", ""]) failures += checkCase(131, "\nਃ", ["\n", "ਃ"]) failures += checkCase(132, "\n̈ਃ", ["\n", "̈ਃ"]) failures += checkCase(133, "\nᄀ", ["\n", "ᄀ"]) failures += checkCase(134, "\n̈ᄀ", ["\n", "̈", "ᄀ"]) failures += checkCase(135, "\nᅠ", ["\n", "ᅠ"]) failures += checkCase(136, "\n̈ᅠ", ["\n", "̈", "ᅠ"]) failures += checkCase(137, "\nᆨ", ["\n", "ᆨ"]) failures += checkCase(138, "\n̈ᆨ", ["\n", "̈", "ᆨ"]) failures += checkCase(139, "\n가", ["\n", "가"]) failures += checkCase(140, "\n̈가", ["\n", "̈", "가"]) failures += checkCase(141, "\n각", ["\n", "각"]) failures += checkCase(142, "\n̈각", ["\n", "̈", "각"]) failures += checkCase(143, "\nः", ["\n", "ः"]) failures += checkCase(144, "\n̈ः", ["\n", "̈ः"]) failures += checkCase(145, "\nऄ", ["\n", "ऄ"]) failures += checkCase(146, "\n̈ऄ", ["\n", "̈", "ऄ"]) failures += checkCase(147, "\nൎ", ["\n", "ൎ"]) failures += checkCase(148, "\n̈ൎ", ["\n", "̈", "ൎ"]) failures += checkCase(149, "\nक", ["\n", "क"]) failures += checkCase(150, "\n̈क", ["\n", "̈", "क"]) failures += checkCase(151, "\n⌚", ["\n", "⌚"]) failures += checkCase(152, "\n̈⌚", ["\n", "̈", "⌚"]) failures}
graphemecases2.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(153, "\ǹ", ["\n", "̀"]) failures += checkCase(154, "\n̈̀", ["\n", "̈̀"]) failures += checkCase(155, "\nऀ", ["\n", "ऀ"]) failures += checkCase(156, "\n̈ऀ", ["\n", "̈ऀ"]) failures += checkCase(157, "\n्", ["\n", "्"]) failures += checkCase(158, "\n्̈", ["\n", "्̈"]) failures += checkCase(159, "\n", ["\n", ""]) failures += checkCase(160, "\n̈", ["\n", "̈"]) failures += checkCase(161, "\n", ["\n", ""]) failures += checkCase(162, "\n̈", ["\n", "̈", ""]) failures += checkCase(163, " ", ["", " "]) failures += checkCase(164, "̈ ", ["", "̈", " "]) failures += checkCase(165, "\r", ["", "\r"]) failures += checkCase(166, "̈\r", ["", "̈", "\r"]) failures += checkCase(167, "\n", ["", "\n"]) failures += checkCase(168, "̈\n", ["", "̈", "\n"]) failures += checkCase(169, "", ["", ""]) failures += checkCase(170, "̈", ["", "̈", ""]) failures += checkCase(171, "", ["", ""]) failures += checkCase(172, "̈", ["", "̈"]) failures += checkCase(173, "🇦", ["", "🇦"]) failures += checkCase(174, "̈🇦", ["", "̈", "🇦"]) failures += checkCase(175, "", ["", ""]) failures += checkCase(176, "̈", ["", "̈", ""]) failures += checkCase(177, "ਃ", ["", "ਃ"]) failures += checkCase(178, "̈ਃ", ["", "̈ਃ"]) failures += checkCase(179, "ᄀ", ["", "ᄀ"]) failures += checkCase(180, "̈ᄀ", ["", "̈", "ᄀ"]) failures += checkCase(181, "ᅠ", ["", "ᅠ"]) failures += checkCase(182, "̈ᅠ", ["", "̈", "ᅠ"]) failures += checkCase(183, "ᆨ", ["", "ᆨ"]) failures += checkCase(184, "̈ᆨ", ["", "̈", "ᆨ"]) failures += checkCase(185, "가", ["", "가"]) failures += checkCase(186, "̈가", ["", "̈", "가"]) failures += checkCase(187, "각", ["", "각"]) failures += checkCase(188, "̈각", ["", "̈", "각"]) failures += checkCase(189, "ः", ["", "ः"]) failures += checkCase(190, "̈ः", ["", "̈ः"]) failures += checkCase(191, "ऄ", ["", "ऄ"]) failures += checkCase(192, "̈ऄ", ["", "̈", "ऄ"]) failures += checkCase(193, "ൎ", ["", "ൎ"]) failures += checkCase(194, "̈ൎ", ["", "̈", "ൎ"]) failures += checkCase(195, "क", ["", "क"]) failures += checkCase(196, "̈क", ["", "̈", "क"]) failures += checkCase(197, "⌚", ["", "⌚"]) failures += checkCase(198, "̈⌚", ["", "̈", "⌚"]) failures += checkCase(199, "̀", ["", "̀"]) failures += checkCase(200, "̈̀", ["", "̈̀"]) failures += checkCase(201, "ऀ", ["", "ऀ"]) failures += checkCase(202, "̈ऀ", ["", "̈ऀ"]) failures += checkCase(203, "्", ["", "्"]) failures += checkCase(204, "्̈", ["", "्̈"]) failures += checkCase(205, "", ["", ""]) failures += checkCase(206, "̈", ["", "̈"]) failures += checkCase(207, "", ["", ""]) failures += checkCase(208, "̈", ["", "̈", ""]) failures += checkCase(209, " ", ["", " "]) failures += checkCase(210, "̈ ", ["̈", " "]) failures += checkCase(211, "\r", ["", "\r"]) failures += checkCase(212, "̈\r", ["̈", "\r"]) failures += checkCase(213, "\n", ["", "\n"]) failures += checkCase(214, "̈\n", ["̈", "\n"]) failures += checkCase(215, "", ["", ""]) failures += checkCase(216, "̈", ["̈", ""]) failures}
graphemecases3.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(217, "", [""]) failures += checkCase(218, "̈", ["̈"]) failures += checkCase(219, "🇦", ["", "🇦"]) failures += checkCase(220, "̈🇦", ["̈", "🇦"]) failures += checkCase(221, "", ["", ""]) failures += checkCase(222, "̈", ["̈", ""]) failures += checkCase(223, "ਃ", ["ਃ"]) failures += checkCase(224, "̈ਃ", ["̈ਃ"]) failures += checkCase(225, "ᄀ", ["", "ᄀ"]) failures += checkCase(226, "̈ᄀ", ["̈", "ᄀ"]) failures += checkCase(227, "ᅠ", ["", "ᅠ"]) failures += checkCase(228, "̈ᅠ", ["̈", "ᅠ"]) failures += checkCase(229, "ᆨ", ["", "ᆨ"]) failures += checkCase(230, "̈ᆨ", ["̈", "ᆨ"]) failures += checkCase(231, "가", ["", "가"]) failures += checkCase(232, "̈가", ["̈", "가"]) failures += checkCase(233, "각", ["", "각"]) failures += checkCase(234, "̈각", ["̈", "각"]) failures += checkCase(235, "ः", ["ः"]) failures += checkCase(236, "̈ः", ["̈ः"]) failures += checkCase(237, "ऄ", ["", "ऄ"]) failures += checkCase(238, "̈ऄ", ["̈", "ऄ"]) failures += checkCase(239, "ൎ", ["", "ൎ"]) failures += checkCase(240, "̈ൎ", ["̈", "ൎ"]) failures += checkCase(241, "क", ["", "क"]) failures += checkCase(242, "̈क", ["̈", "क"]) failures += checkCase(243, "⌚", ["", "⌚"]) failures += checkCase(244, "̈⌚", ["̈", "⌚"]) failures += checkCase(245, "̀", ["̀"]) failures += checkCase(246, "̈̀", ["̈̀"]) failures += checkCase(247, "ऀ", ["ऀ"]) failures += checkCase(248, "̈ऀ", ["̈ऀ"]) failures += checkCase(249, "्", ["्"]) failures += checkCase(250, "्̈", ["्̈"]) failures += checkCase(251, "", [""]) failures += checkCase(252, "̈", ["̈"]) failures += checkCase(253, "", ["", ""]) failures += checkCase(254, "̈", ["̈", ""]) failures += checkCase(255, "🇦 ", ["🇦", " "]) failures += checkCase(256, "🇦̈ ", ["🇦̈", " "]) failures += checkCase(257, "🇦\r", ["🇦", "\r"]) failures += checkCase(258, "🇦̈\r", ["🇦̈", "\r"]) failures += checkCase(259, "🇦\n", ["🇦", "\n"]) failures += checkCase(260, "🇦̈\n", ["🇦̈", "\n"]) failures += checkCase(261, "🇦", ["🇦", ""]) failures += checkCase(262, "🇦̈", ["🇦̈", ""]) failures += checkCase(263, "🇦", ["🇦"]) failures += checkCase(264, "🇦̈", ["🇦̈"]) failures += checkCase(265, "🇦🇦", ["🇦🇦"]) failures += checkCase(266, "🇦̈🇦", ["🇦̈", "🇦"]) failures += checkCase(267, "🇦", ["🇦", ""]) failures += checkCase(268, "🇦̈", ["🇦̈", ""]) failures += checkCase(269, "🇦ਃ", ["🇦ਃ"]) failures += checkCase(270, "🇦̈ਃ", ["🇦̈ਃ"]) failures += checkCase(271, "🇦ᄀ", ["🇦", "ᄀ"]) failures += checkCase(272, "🇦̈ᄀ", ["🇦̈", "ᄀ"]) failures += checkCase(273, "🇦ᅠ", ["🇦", "ᅠ"]) failures += checkCase(274, "🇦̈ᅠ", ["🇦̈", "ᅠ"]) failures += checkCase(275, "🇦ᆨ", ["🇦", "ᆨ"]) failures += checkCase(276, "🇦̈ᆨ", ["🇦̈", "ᆨ"]) failures += checkCase(277, "🇦가", ["🇦", "가"]) failures += checkCase(278, "🇦̈가", ["🇦̈", "가"]) failures += checkCase(279, "🇦각", ["🇦", "각"]) failures += checkCase(280, "🇦̈각", ["🇦̈", "각"]) failures}
graphemecases4.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(281, "🇦ः", ["🇦ः"]) failures += checkCase(282, "🇦̈ः", ["🇦̈ः"]) failures += checkCase(283, "🇦ऄ", ["🇦", "ऄ"]) failures += checkCase(284, "🇦̈ऄ", ["🇦̈", "ऄ"]) failures += checkCase(285, "🇦ൎ", ["🇦", "ൎ"]) failures += checkCase(286, "🇦̈ൎ", ["🇦̈", "ൎ"]) failures += checkCase(287, "🇦क", ["🇦", "क"]) failures += checkCase(288, "🇦̈क", ["🇦̈", "क"]) failures += checkCase(289, "🇦⌚", ["🇦", "⌚"]) failures += checkCase(290, "🇦̈⌚", ["🇦̈", "⌚"]) failures += checkCase(291, "🇦̀", ["🇦̀"]) failures += checkCase(292, "🇦̈̀", ["🇦̈̀"]) failures += checkCase(293, "🇦ऀ", ["🇦ऀ"]) failures += checkCase(294, "🇦̈ऀ", ["🇦̈ऀ"]) failures += checkCase(295, "🇦्", ["🇦्"]) failures += checkCase(296, "🇦्̈", ["🇦्̈"]) failures += checkCase(297, "🇦", ["🇦"]) failures += checkCase(298, "🇦̈", ["🇦̈"]) failures += checkCase(299, "🇦", ["🇦", ""]) failures += checkCase(300, "🇦̈", ["🇦̈", ""]) failures += checkCase(301, " ", [" "]) failures += checkCase(302, "̈ ", ["̈", " "]) failures += checkCase(303, "\r", ["", "\r"]) failures += checkCase(304, "̈\r", ["̈", "\r"]) failures += checkCase(305, "\n", ["", "\n"]) failures += checkCase(306, "̈\n", ["̈", "\n"]) failures += checkCase(307, "", ["", ""]) failures += checkCase(308, "̈", ["̈", ""]) failures += checkCase(309, "", [""]) failures += checkCase(310, "̈", ["̈"]) failures += checkCase(311, "🇦", ["🇦"]) failures += checkCase(312, "̈🇦", ["̈", "🇦"]) failures += checkCase(313, "", [""]) failures += checkCase(314, "̈", ["̈", ""]) failures += checkCase(315, "ਃ", ["ਃ"]) failures += checkCase(316, "̈ਃ", ["̈ਃ"]) failures += checkCase(317, "ᄀ", ["ᄀ"]) failures += checkCase(318, "̈ᄀ", ["̈", "ᄀ"]) failures += checkCase(319, "ᅠ", ["ᅠ"]) failures += checkCase(320, "̈ᅠ", ["̈", "ᅠ"]) failures += checkCase(321, "ᆨ", ["ᆨ"]) failures += checkCase(322, "̈ᆨ", ["̈", "ᆨ"]) failures += checkCase(323, "가", ["가"]) failures += checkCase(324, "̈가", ["̈", "가"]) failures += checkCase(325, "각", ["각"]) failures += checkCase(326, "̈각", ["̈", "각"]) failures += checkCase(327, "ः", ["ः"]) failures += checkCase(328, "̈ः", ["̈ः"]) failures += checkCase(329, "ऄ", ["ऄ"]) failures += checkCase(330, "̈ऄ", ["̈", "ऄ"]) failures += checkCase(331, "ൎ", ["ൎ"]) failures += checkCase(332, "̈ൎ", ["̈", "ൎ"]) failures += checkCase(333, "क", ["क"]) failures += checkCase(334, "̈क", ["̈", "क"]) failures += checkCase(335, "⌚", ["⌚"]) failures += checkCase(336, "̈⌚", ["̈", "⌚"]) failures += checkCase(337, "̀", ["̀"]) failures += checkCase(338, "̈̀", ["̈̀"]) failures += checkCase(339, "ऀ", ["ऀ"]) failures += checkCase(340, "̈ऀ", ["̈ऀ"]) failures += checkCase(341, "्", ["्"]) failures += checkCase(342, "्̈", ["्̈"]) failures += checkCase(343, "", [""]) failures += checkCase(344, "̈", ["̈"]) failures}
graphemecases5.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(345, "", [""]) failures += checkCase(346, "̈", ["̈", ""]) failures += checkCase(347, "ਃ ", ["ਃ", " "]) failures += checkCase(348, "ਃ̈ ", ["ਃ̈", " "]) failures += checkCase(349, "ਃ\r", ["ਃ", "\r"]) failures += checkCase(350, "ਃ̈\r", ["ਃ̈", "\r"]) failures += checkCase(351, "ਃ\n", ["ਃ", "\n"]) failures += checkCase(352, "ਃ̈\n", ["ਃ̈", "\n"]) failures += checkCase(353, "ਃ", ["ਃ", ""]) failures += checkCase(354, "ਃ̈", ["ਃ̈", ""]) failures += checkCase(355, "ਃ", ["ਃ"]) failures += checkCase(356, "ਃ̈", ["ਃ̈"]) failures += checkCase(357, "ਃ🇦", ["ਃ", "🇦"]) failures += checkCase(358, "ਃ̈🇦", ["ਃ̈", "🇦"]) failures += checkCase(359, "ਃ", ["ਃ", ""]) failures += checkCase(360, "ਃ̈", ["ਃ̈", ""]) failures += checkCase(361, "ਃਃ", ["ਃਃ"]) failures += checkCase(362, "ਃ̈ਃ", ["ਃ̈ਃ"]) failures += checkCase(363, "ਃᄀ", ["ਃ", "ᄀ"]) failures += checkCase(364, "ਃ̈ᄀ", ["ਃ̈", "ᄀ"]) failures += checkCase(365, "ਃᅠ", ["ਃ", "ᅠ"]) failures += checkCase(366, "ਃ̈ᅠ", ["ਃ̈", "ᅠ"]) failures += checkCase(367, "ਃᆨ", ["ਃ", "ᆨ"]) failures += checkCase(368, "ਃ̈ᆨ", ["ਃ̈", "ᆨ"]) failures += checkCase(369, "ਃ가", ["ਃ", "가"]) failures += checkCase(370, "ਃ̈가", ["ਃ̈", "가"]) failures += checkCase(371, "ਃ각", ["ਃ", "각"]) failures += checkCase(372, "ਃ̈각", ["ਃ̈", "각"]) failures += checkCase(373, "ਃः", ["ਃः"]) failures += checkCase(374, "ਃ̈ः", ["ਃ̈ः"]) failures += checkCase(375, "ਃऄ", ["ਃ", "ऄ"]) failures += checkCase(376, "ਃ̈ऄ", ["ਃ̈", "ऄ"]) failures += checkCase(377, "ਃൎ", ["ਃ", "ൎ"]) failures += checkCase(378, "ਃ̈ൎ", ["ਃ̈", "ൎ"]) failures += checkCase(379, "ਃक", ["ਃ", "क"]) failures += checkCase(380, "ਃ̈क", ["ਃ̈", "क"]) failures += checkCase(381, "ਃ⌚", ["ਃ", "⌚"]) failures += checkCase(382, "ਃ̈⌚", ["ਃ̈", "⌚"]) failures += checkCase(383, "ਃ̀", ["ਃ̀"]) failures += checkCase(384, "ਃ̈̀", ["ਃ̈̀"]) failures += checkCase(385, "ਃऀ", ["ਃऀ"]) failures += checkCase(386, "ਃ̈ऀ", ["ਃ̈ऀ"]) failures += checkCase(387, "ਃ्", ["ਃ्"]) failures += checkCase(388, "ਃ्̈", ["ਃ्̈"]) failures += checkCase(389, "ਃ", ["ਃ"]) failures += checkCase(390, "ਃ̈", ["ਃ̈"]) failures += checkCase(391, "ਃ", ["ਃ", ""]) failures += checkCase(392, "ਃ̈", ["ਃ̈", ""]) failures += checkCase(393, "ᄀ ", ["ᄀ", " "]) failures += checkCase(394, "ᄀ̈ ", ["ᄀ̈", " "]) failures += checkCase(395, "ᄀ\r", ["ᄀ", "\r"]) failures += checkCase(396, "ᄀ̈\r", ["ᄀ̈", "\r"]) failures += checkCase(397, "ᄀ\n", ["ᄀ", "\n"]) failures += checkCase(398, "ᄀ̈\n", ["ᄀ̈", "\n"]) failures += checkCase(399, "ᄀ", ["ᄀ", ""]) failures += checkCase(400, "ᄀ̈", ["ᄀ̈", ""]) failures += checkCase(401, "ᄀ", ["ᄀ"]) failures += checkCase(402, "ᄀ̈", ["ᄀ̈"]) failures += checkCase(403, "ᄀ🇦", ["ᄀ", "🇦"]) failures += checkCase(404, "ᄀ̈🇦", ["ᄀ̈", "🇦"]) failures += checkCase(405, "ᄀ", ["ᄀ", ""]) failures += checkCase(406, "ᄀ̈", ["ᄀ̈", ""]) failures += checkCase(407, "ᄀਃ", ["ᄀਃ"]) failures += checkCase(408, "ᄀ̈ਃ", ["ᄀ̈ਃ"]) failures}
graphemecases6.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(409, "ᄀᄀ", ["ᄀᄀ"]) failures += checkCase(410, "ᄀ̈ᄀ", ["ᄀ̈", "ᄀ"]) failures += checkCase(411, "ᄀᅠ", ["ᄀᅠ"]) failures += checkCase(412, "ᄀ̈ᅠ", ["ᄀ̈", "ᅠ"]) failures += checkCase(413, "ᄀᆨ", ["ᄀ", "ᆨ"]) failures += checkCase(414, "ᄀ̈ᆨ", ["ᄀ̈", "ᆨ"]) failures += checkCase(415, "ᄀ가", ["ᄀ가"]) failures += checkCase(416, "ᄀ̈가", ["ᄀ̈", "가"]) failures += checkCase(417, "ᄀ각", ["ᄀ각"]) failures += checkCase(418, "ᄀ̈각", ["ᄀ̈", "각"]) failures += checkCase(419, "ᄀः", ["ᄀः"]) failures += checkCase(420, "ᄀ̈ः", ["ᄀ̈ः"]) failures += checkCase(421, "ᄀऄ", ["ᄀ", "ऄ"]) failures += checkCase(422, "ᄀ̈ऄ", ["ᄀ̈", "ऄ"]) failures += checkCase(423, "ᄀൎ", ["ᄀ", "ൎ"]) failures += checkCase(424, "ᄀ̈ൎ", ["ᄀ̈", "ൎ"]) failures += checkCase(425, "ᄀक", ["ᄀ", "क"]) failures += checkCase(426, "ᄀ̈क", ["ᄀ̈", "क"]) failures += checkCase(427, "ᄀ⌚", ["ᄀ", "⌚"]) failures += checkCase(428, "ᄀ̈⌚", ["ᄀ̈", "⌚"]) failures += checkCase(429, "ᄀ̀", ["ᄀ̀"]) failures += checkCase(430, "ᄀ̈̀", ["ᄀ̈̀"]) failures += checkCase(431, "ᄀऀ", ["ᄀऀ"]) failures += checkCase(432, "ᄀ̈ऀ", ["ᄀ̈ऀ"]) failures += checkCase(433, "ᄀ्", ["ᄀ्"]) failures += checkCase(434, "ᄀ्̈", ["ᄀ्̈"]) failures += checkCase(435, "ᄀ", ["ᄀ"]) failures += checkCase(436, "ᄀ̈", ["ᄀ̈"]) failures += checkCase(437, "ᄀ", ["ᄀ", ""]) failures += checkCase(438, "ᄀ̈", ["ᄀ̈", ""]) failures += checkCase(439, "ᅠ ", ["ᅠ", " "]) failures += checkCase(440, "ᅠ̈ ", ["ᅠ̈", " "]) failures += checkCase(441, "ᅠ\r", ["ᅠ", "\r"]) failures += checkCase(442, "ᅠ̈\r", ["ᅠ̈", "\r"]) failures += checkCase(443, "ᅠ\n", ["ᅠ", "\n"]) failures += checkCase(444, "ᅠ̈\n", ["ᅠ̈", "\n"]) failures += checkCase(445, "ᅠ", ["ᅠ", ""]) failures += checkCase(446, "ᅠ̈", ["ᅠ̈", ""]) failures += checkCase(447, "ᅠ", ["ᅠ"]) failures += checkCase(448, "ᅠ̈", ["ᅠ̈"]) failures += checkCase(449, "ᅠ🇦", ["ᅠ", "🇦"]) failures += checkCase(450, "ᅠ̈🇦", ["ᅠ̈", "🇦"]) failures += checkCase(451, "ᅠ", ["ᅠ", ""]) failures += checkCase(452, "ᅠ̈", ["ᅠ̈", ""]) failures += checkCase(453, "ᅠਃ", ["ᅠਃ"]) failures += checkCase(454, "ᅠ̈ਃ", ["ᅠ̈ਃ"]) failures += checkCase(455, "ᅠᄀ", ["ᅠ", "ᄀ"]) failures += checkCase(456, "ᅠ̈ᄀ", ["ᅠ̈", "ᄀ"]) failures += checkCase(457, "ᅠᅠ", ["ᅠᅠ"]) failures += checkCase(458, "ᅠ̈ᅠ", ["ᅠ̈", "ᅠ"]) failures += checkCase(459, "ᅠᆨ", ["ᅠᆨ"]) failures += checkCase(460, "ᅠ̈ᆨ", ["ᅠ̈", "ᆨ"]) failures += checkCase(461, "ᅠ가", ["ᅠ", "가"]) failures += checkCase(462, "ᅠ̈가", ["ᅠ̈", "가"]) failures += checkCase(463, "ᅠ각", ["ᅠ", "각"]) failures += checkCase(464, "ᅠ̈각", ["ᅠ̈", "각"]) failures += checkCase(465, "ᅠः", ["ᅠः"]) failures += checkCase(466, "ᅠ̈ः", ["ᅠ̈ः"]) failures += checkCase(467, "ᅠऄ", ["ᅠ", "ऄ"]) failures += checkCase(468, "ᅠ̈ऄ", ["ᅠ̈", "ऄ"]) failures += checkCase(469, "ᅠൎ", ["ᅠ", "ൎ"]) failures += checkCase(470, "ᅠ̈ൎ", ["ᅠ̈", "ൎ"]) failures += checkCase(471, "ᅠक", ["ᅠ", "क"]) failures += checkCase(472, "ᅠ̈क", ["ᅠ̈", "क"]) failures}
graphemecases7.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(473, "ᅠ⌚", ["ᅠ", "⌚"]) failures += checkCase(474, "ᅠ̈⌚", ["ᅠ̈", "⌚"]) failures += checkCase(475, "ᅠ̀", ["ᅠ̀"]) failures += checkCase(476, "ᅠ̈̀", ["ᅠ̈̀"]) failures += checkCase(477, "ᅠऀ", ["ᅠऀ"]) failures += checkCase(478, "ᅠ̈ऀ", ["ᅠ̈ऀ"]) failures += checkCase(479, "ᅠ्", ["ᅠ्"]) failures += checkCase(480, "ᅠ्̈", ["ᅠ्̈"]) failures += checkCase(481, "ᅠ", ["ᅠ"]) failures += checkCase(482, "ᅠ̈", ["ᅠ̈"]) failures += checkCase(483, "ᅠ", ["ᅠ", ""]) failures += checkCase(484, "ᅠ̈", ["ᅠ̈", ""]) failures += checkCase(485, "ᆨ ", ["ᆨ", " "]) failures += checkCase(486, "ᆨ̈ ", ["ᆨ̈", " "]) failures += checkCase(487, "ᆨ\r", ["ᆨ", "\r"]) failures += checkCase(488, "ᆨ̈\r", ["ᆨ̈", "\r"]) failures += checkCase(489, "ᆨ\n", ["ᆨ", "\n"]) failures += checkCase(490, "ᆨ̈\n", ["ᆨ̈", "\n"]) failures += checkCase(491, "ᆨ", ["ᆨ", ""]) failures += checkCase(492, "ᆨ̈", ["ᆨ̈", ""]) failures += checkCase(493, "ᆨ", ["ᆨ"]) failures += checkCase(494, "ᆨ̈", ["ᆨ̈"]) failures += checkCase(495, "ᆨ🇦", ["ᆨ", "🇦"]) failures += checkCase(496, "ᆨ̈🇦", ["ᆨ̈", "🇦"]) failures += checkCase(497, "ᆨ", ["ᆨ", ""]) failures += checkCase(498, "ᆨ̈", ["ᆨ̈", ""]) failures += checkCase(499, "ᆨਃ", ["ᆨਃ"]) failures += checkCase(500, "ᆨ̈ਃ", ["ᆨ̈ਃ"]) failures += checkCase(501, "ᆨᄀ", ["ᆨ", "ᄀ"]) failures += checkCase(502, "ᆨ̈ᄀ", ["ᆨ̈", "ᄀ"]) failures += checkCase(503, "ᆨᅠ", ["ᆨ", "ᅠ"]) failures += checkCase(504, "ᆨ̈ᅠ", ["ᆨ̈", "ᅠ"]) failures += checkCase(505, "ᆨᆨ", ["ᆨᆨ"]) failures += checkCase(506, "ᆨ̈ᆨ", ["ᆨ̈", "ᆨ"]) failures += checkCase(507, "ᆨ가", ["ᆨ", "가"]) failures += checkCase(508, "ᆨ̈가", ["ᆨ̈", "가"]) failures += checkCase(509, "ᆨ각", ["ᆨ", "각"]) failures += checkCase(510, "ᆨ̈각", ["ᆨ̈", "각"]) failures += checkCase(511, "ᆨः", ["ᆨः"]) failures += checkCase(512, "ᆨ̈ः", ["ᆨ̈ः"]) failures += checkCase(513, "ᆨऄ", ["ᆨ", "ऄ"]) failures += checkCase(514, "ᆨ̈ऄ", ["ᆨ̈", "ऄ"]) failures += checkCase(515, "ᆨൎ", ["ᆨ", "ൎ"]) failures += checkCase(516, "ᆨ̈ൎ", ["ᆨ̈", "ൎ"]) failures += checkCase(517, "ᆨक", ["ᆨ", "क"]) failures += checkCase(518, "ᆨ̈क", ["ᆨ̈", "क"]) failures += checkCase(519, "ᆨ⌚", ["ᆨ", "⌚"]) failures += checkCase(520, "ᆨ̈⌚", ["ᆨ̈", "⌚"]) failures += checkCase(521, "ᆨ̀", ["ᆨ̀"]) failures += checkCase(522, "ᆨ̈̀", ["ᆨ̈̀"]) failures += checkCase(523, "ᆨऀ", ["ᆨऀ"]) failures += checkCase(524, "ᆨ̈ऀ", ["ᆨ̈ऀ"]) failures += checkCase(525, "ᆨ्", ["ᆨ्"]) failures += checkCase(526, "ᆨ्̈", ["ᆨ्̈"]) failures += checkCase(527, "ᆨ", ["ᆨ"]) failures += checkCase(528, "ᆨ̈", ["ᆨ̈"]) failures += checkCase(529, "ᆨ", ["ᆨ", ""]) failures += checkCase(530, "ᆨ̈", ["ᆨ̈", ""]) failures += checkCase(531, "가 ", ["가", " "]) failures += checkCase(532, "가̈ ", ["가̈", " "]) failures += checkCase(533, "가\r", ["가", "\r"]) failures += checkCase(534, "가̈\r", ["가̈", "\r"]) failures += checkCase(535, "가\n", ["가", "\n"]) failures += checkCase(536, "가̈\n", ["가̈", "\n"]) failures}
graphemecases8.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(537, "가", ["가", ""]) failures += checkCase(538, "가̈", ["가̈", ""]) failures += checkCase(539, "가", ["가"]) failures += checkCase(540, "가̈", ["가̈"]) failures += checkCase(541, "가🇦", ["가", "🇦"]) failures += checkCase(542, "가̈🇦", ["가̈", "🇦"]) failures += checkCase(543, "가", ["가", ""]) failures += checkCase(544, "가̈", ["가̈", ""]) failures += checkCase(545, "가ਃ", ["가ਃ"]) failures += checkCase(546, "가̈ਃ", ["가̈ਃ"]) failures += checkCase(547, "가ᄀ", ["가", "ᄀ"]) failures += checkCase(548, "가̈ᄀ", ["가̈", "ᄀ"]) failures += checkCase(549, "가ᅠ", ["가ᅠ"]) failures += checkCase(550, "가̈ᅠ", ["가̈", "ᅠ"]) failures += checkCase(551, "각", ["각"]) failures += checkCase(552, "가̈ᆨ", ["가̈", "ᆨ"]) failures += checkCase(553, "가가", ["가", "가"]) failures += checkCase(554, "가̈가", ["가̈", "가"]) failures += checkCase(555, "가각", ["가", "각"]) failures += checkCase(556, "가̈각", ["가̈", "각"]) failures += checkCase(557, "가ः", ["가ः"]) failures += checkCase(558, "가̈ः", ["가̈ः"]) failures += checkCase(559, "가ऄ", ["가", "ऄ"]) failures += checkCase(560, "가̈ऄ", ["가̈", "ऄ"]) failures += checkCase(561, "가ൎ", ["가", "ൎ"]) failures += checkCase(562, "가̈ൎ", ["가̈", "ൎ"]) failures += checkCase(563, "가क", ["가", "क"]) failures += checkCase(564, "가̈क", ["가̈", "क"]) failures += checkCase(565, "가⌚", ["가", "⌚"]) failures += checkCase(566, "가̈⌚", ["가̈", "⌚"]) failures += checkCase(567, "가̀", ["가̀"]) failures += checkCase(568, "가̈̀", ["가̈̀"]) failures += checkCase(569, "가ऀ", ["가ऀ"]) failures += checkCase(570, "가̈ऀ", ["가̈ऀ"]) failures += checkCase(571, "가्", ["가्"]) failures += checkCase(572, "가्̈", ["가्̈"]) failures += checkCase(573, "가", ["가"]) failures += checkCase(574, "가̈", ["가̈"]) failures += checkCase(575, "가", ["가", ""]) failures += checkCase(576, "가̈", ["가̈", ""]) failures += checkCase(577, "각 ", ["각", " "]) failures += checkCase(578, "각̈ ", ["각̈", " "]) failures += checkCase(579, "각\r", ["각", "\r"]) failures += checkCase(580, "각̈\r", ["각̈", "\r"]) failures += checkCase(581, "각\n", ["각", "\n"]) failures += checkCase(582, "각̈\n", ["각̈", "\n"]) failures += checkCase(583, "각", ["각", ""]) failures += checkCase(584, "각̈", ["각̈", ""]) failures += checkCase(585, "각", ["각"]) failures += checkCase(586, "각̈", ["각̈"]) failures += checkCase(587, "각🇦", ["각", "🇦"]) failures += checkCase(588, "각̈🇦", ["각̈", "🇦"]) failures += checkCase(589, "각", ["각", ""]) failures += checkCase(590, "각̈", ["각̈", ""]) failures += checkCase(591, "각ਃ", ["각ਃ"]) failures += checkCase(592, "각̈ਃ", ["각̈ਃ"]) failures += checkCase(593, "각ᄀ", ["각", "ᄀ"]) failures += checkCase(594, "각̈ᄀ", ["각̈", "ᄀ"]) failures += checkCase(595, "각ᅠ", ["각", "ᅠ"]) failures += checkCase(596, "각̈ᅠ", ["각̈", "ᅠ"]) failures += checkCase(597, "각ᆨ", ["각ᆨ"]) failures += checkCase(598, "각̈ᆨ", ["각̈", "ᆨ"]) failures += checkCase(599, "각가", ["각", "가"]) failures += checkCase(600, "각̈가", ["각̈", "가"]) failures}
graphemecases9.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(601, "각각", ["각", "각"]) failures += checkCase(602, "각̈각", ["각̈", "각"]) failures += checkCase(603, "각ः", ["각ः"]) failures += checkCase(604, "각̈ः", ["각̈ः"]) failures += checkCase(605, "각ऄ", ["각", "ऄ"]) failures += checkCase(606, "각̈ऄ", ["각̈", "ऄ"]) failures += checkCase(607, "각ൎ", ["각", "ൎ"]) failures += checkCase(608, "각̈ൎ", ["각̈", "ൎ"]) failures += checkCase(609, "각क", ["각", "क"]) failures += checkCase(610, "각̈क", ["각̈", "क"]) failures += checkCase(611, "각⌚", ["각", "⌚"]) failures += checkCase(612, "각̈⌚", ["각̈", "⌚"]) failures += checkCase(613, "각̀", ["각̀"]) failures += checkCase(614, "각̈̀", ["각̈̀"]) failures += checkCase(615, "각ऀ", ["각ऀ"]) failures += checkCase(616, "각̈ऀ", ["각̈ऀ"]) failures += checkCase(617, "각्", ["각्"]) failures += checkCase(618, "각्̈", ["각्̈"]) failures += checkCase(619, "각", ["각"]) failures += checkCase(620, "각̈", ["각̈"]) failures += checkCase(621, "각", ["각", ""]) failures += checkCase(622, "각̈", ["각̈", ""]) failures += checkCase(623, "ः ", ["ः", " "]) failures += checkCase(624, "ः̈ ", ["ः̈", " "]) failures += checkCase(625, "ः\r", ["ः", "\r"]) failures += checkCase(626, "ः̈\r", ["ः̈", "\r"]) failures += checkCase(627, "ः\n", ["ः", "\n"]) failures += checkCase(628, "ः̈\n", ["ः̈", "\n"]) failures += checkCase(629, "ः", ["ः", ""]) failures += checkCase(630, "ः̈", ["ः̈", ""]) failures += checkCase(631, "ः", ["ः"]) failures += checkCase(632, "ः̈", ["ः̈"]) failures += checkCase(633, "ः🇦", ["ः", "🇦"]) failures += checkCase(634, "ः̈🇦", ["ः̈", "🇦"]) failures += checkCase(635, "ः", ["ः", ""]) failures += checkCase(636, "ः̈", ["ः̈", ""]) failures += checkCase(637, "ःਃ", ["ःਃ"]) failures += checkCase(638, "ः̈ਃ", ["ः̈ਃ"]) failures += checkCase(639, "ःᄀ", ["ः", "ᄀ"]) failures += checkCase(640, "ः̈ᄀ", ["ः̈", "ᄀ"]) failures += checkCase(641, "ःᅠ", ["ः", "ᅠ"]) failures += checkCase(642, "ः̈ᅠ", ["ः̈", "ᅠ"]) failures += checkCase(643, "ःᆨ", ["ः", "ᆨ"]) failures += checkCase(644, "ः̈ᆨ", ["ः̈", "ᆨ"]) failures += checkCase(645, "ः가", ["ः", "가"]) failures += checkCase(646, "ः̈가", ["ः̈", "가"]) failures += checkCase(647, "ः각", ["ः", "각"]) failures += checkCase(648, "ः̈각", ["ः̈", "각"]) failures += checkCase(649, "ःः", ["ःः"]) failures += checkCase(650, "ः̈ः", ["ः̈ः"]) failures += checkCase(651, "ःऄ", ["ः", "ऄ"]) failures += checkCase(652, "ः̈ऄ", ["ः̈", "ऄ"]) failures += checkCase(653, "ःൎ", ["ः", "ൎ"]) failures += checkCase(654, "ः̈ൎ", ["ः̈", "ൎ"]) failures += checkCase(655, "ःक", ["ः", "क"]) failures += checkCase(656, "ः̈क", ["ः̈", "क"]) failures += checkCase(657, "ः⌚", ["ः", "⌚"]) failures += checkCase(658, "ः̈⌚", ["ः̈", "⌚"]) failures += checkCase(659, "ः̀", ["ः̀"]) failures += checkCase(660, "ः̈̀", ["ः̈̀"]) failures += checkCase(661, "ःऀ", ["ःऀ"]) failures += checkCase(662, "ः̈ऀ", ["ः̈ऀ"]) failures += checkCase(663, "ः्", ["ः्"]) failures += checkCase(664, "ः्̈", ["ः्̈"]) failures}
graphemecases10.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(665, "ः", ["ः"]) failures += checkCase(666, "ः̈", ["ः̈"]) failures += checkCase(667, "ः", ["ः", ""]) failures += checkCase(668, "ः̈", ["ः̈", ""]) failures += checkCase(669, "ऄ ", ["ऄ", " "]) failures += checkCase(670, "ऄ̈ ", ["ऄ̈", " "]) failures += checkCase(671, "ऄ\r", ["ऄ", "\r"]) failures += checkCase(672, "ऄ̈\r", ["ऄ̈", "\r"]) failures += checkCase(673, "ऄ\n", ["ऄ", "\n"]) failures += checkCase(674, "ऄ̈\n", ["ऄ̈", "\n"]) failures += checkCase(675, "ऄ", ["ऄ", ""]) failures += checkCase(676, "ऄ̈", ["ऄ̈", ""]) failures += checkCase(677, "ऄ", ["ऄ"]) failures += checkCase(678, "ऄ̈", ["ऄ̈"]) failures += checkCase(679, "ऄ🇦", ["ऄ", "🇦"]) failures += checkCase(680, "ऄ̈🇦", ["ऄ̈", "🇦"]) failures += checkCase(681, "ऄ", ["ऄ", ""]) failures += checkCase(682, "ऄ̈", ["ऄ̈", ""]) failures += checkCase(683, "ऄਃ", ["ऄਃ"]) failures += checkCase(684, "ऄ̈ਃ", ["ऄ̈ਃ"]) failures += checkCase(685, "ऄᄀ", ["ऄ", "ᄀ"]) failures += checkCase(686, "ऄ̈ᄀ", ["ऄ̈", "ᄀ"]) failures += checkCase(687, "ऄᅠ", ["ऄ", "ᅠ"]) failures += checkCase(688, "ऄ̈ᅠ", ["ऄ̈", "ᅠ"]) failures += checkCase(689, "ऄᆨ", ["ऄ", "ᆨ"]) failures += checkCase(690, "ऄ̈ᆨ", ["ऄ̈", "ᆨ"]) failures += checkCase(691, "ऄ가", ["ऄ", "가"]) failures += checkCase(692, "ऄ̈가", ["ऄ̈", "가"]) failures += checkCase(693, "ऄ각", ["ऄ", "각"]) failures += checkCase(694, "ऄ̈각", ["ऄ̈", "각"]) failures += checkCase(695, "ऄः", ["ऄः"]) failures += checkCase(696, "ऄ̈ः", ["ऄ̈ः"]) failures += checkCase(697, "ऄऄ", ["ऄ", "ऄ"]) failures += checkCase(698, "ऄ̈ऄ", ["ऄ̈", "ऄ"]) failures += checkCase(699, "ऄൎ", ["ऄ", "ൎ"]) failures += checkCase(700, "ऄ̈ൎ", ["ऄ̈", "ൎ"]) failures += checkCase(701, "ऄक", ["ऄ", "क"]) failures += checkCase(702, "ऄ̈क", ["ऄ̈", "क"]) failures += checkCase(703, "ऄ⌚", ["ऄ", "⌚"]) failures += checkCase(704, "ऄ̈⌚", ["ऄ̈", "⌚"]) failures += checkCase(705, "ऄ̀", ["ऄ̀"]) failures += checkCase(706, "ऄ̈̀", ["ऄ̈̀"]) failures += checkCase(707, "ऄऀ", ["ऄऀ"]) failures += checkCase(708, "ऄ̈ऀ", ["ऄ̈ऀ"]) failures += checkCase(709, "ऄ्", ["ऄ्"]) failures += checkCase(710, "ऄ्̈", ["ऄ्̈"]) failures += checkCase(711, "ऄ", ["ऄ"]) failures += checkCase(712, "ऄ̈", ["ऄ̈"]) failures += checkCase(713, "ऄ", ["ऄ", ""]) failures += checkCase(714, "ऄ̈", ["ऄ̈", ""]) failures += checkCase(715, "ൎ ", ["ൎ "]) failures += checkCase(716, "ൎ̈ ", ["ൎ̈", " "]) failures += checkCase(717, "ൎ\r", ["ൎ", "\r"]) failures += checkCase(718, "ൎ̈\r", ["ൎ̈", "\r"]) failures += checkCase(719, "ൎ\n", ["ൎ", "\n"]) failures += checkCase(720, "ൎ̈\n", ["ൎ̈", "\n"]) failures += checkCase(721, "ൎ", ["ൎ", ""]) failures += checkCase(722, "ൎ̈", ["ൎ̈", ""]) failures += checkCase(723, "ൎ", ["ൎ"]) failures += checkCase(724, "ൎ̈", ["ൎ̈"]) failures += checkCase(725, "ൎ🇦", ["ൎ🇦"]) failures += checkCase(726, "ൎ̈🇦", ["ൎ̈", "🇦"]) failures += checkCase(727, "ൎ", ["ൎ"]) failures += checkCase(728, "ൎ̈", ["ൎ̈", ""]) failures}
graphemecases11.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(729, "ൎਃ", ["ൎਃ"]) failures += checkCase(730, "ൎ̈ਃ", ["ൎ̈ਃ"]) failures += checkCase(731, "ൎᄀ", ["ൎᄀ"]) failures += checkCase(732, "ൎ̈ᄀ", ["ൎ̈", "ᄀ"]) failures += checkCase(733, "ൎᅠ", ["ൎᅠ"]) failures += checkCase(734, "ൎ̈ᅠ", ["ൎ̈", "ᅠ"]) failures += checkCase(735, "ൎᆨ", ["ൎᆨ"]) failures += checkCase(736, "ൎ̈ᆨ", ["ൎ̈", "ᆨ"]) failures += checkCase(737, "ൎ가", ["ൎ가"]) failures += checkCase(738, "ൎ̈가", ["ൎ̈", "가"]) failures += checkCase(739, "ൎ각", ["ൎ각"]) failures += checkCase(740, "ൎ̈각", ["ൎ̈", "각"]) failures += checkCase(741, "ൎः", ["ൎः"]) failures += checkCase(742, "ൎ̈ः", ["ൎ̈ः"]) failures += checkCase(743, "ൎऄ", ["ൎऄ"]) failures += checkCase(744, "ൎ̈ऄ", ["ൎ̈", "ऄ"]) failures += checkCase(745, "ൎൎ", ["ൎൎ"]) failures += checkCase(746, "ൎ̈ൎ", ["ൎ̈", "ൎ"]) failures += checkCase(747, "ൎक", ["ൎक"]) failures += checkCase(748, "ൎ̈क", ["ൎ̈", "क"]) failures += checkCase(749, "ൎ⌚", ["ൎ⌚"]) failures += checkCase(750, "ൎ̈⌚", ["ൎ̈", "⌚"]) failures += checkCase(751, "ൎ̀", ["ൎ̀"]) failures += checkCase(752, "ൎ̈̀", ["ൎ̈̀"]) failures += checkCase(753, "ൎऀ", ["ൎऀ"]) failures += checkCase(754, "ൎ̈ऀ", ["ൎ̈ऀ"]) failures += checkCase(755, "ൎ्", ["ൎ्"]) failures += checkCase(756, "ൎ्̈", ["ൎ्̈"]) failures += checkCase(757, "ൎ", ["ൎ"]) failures += checkCase(758, "ൎ̈", ["ൎ̈"]) failures += checkCase(759, "ൎ", ["ൎ"]) failures += checkCase(760, "ൎ̈", ["ൎ̈", ""]) failures += checkCase(761, "क ", ["क", " "]) failures += checkCase(762, "क̈ ", ["क̈", " "]) failures += checkCase(763, "क\r", ["क", "\r"]) failures += checkCase(764, "क̈\r", ["क̈", "\r"]) failures += checkCase(765, "क\n", ["क", "\n"]) failures += checkCase(766, "क̈\n", ["क̈", "\n"]) failures += checkCase(767, "क", ["क", ""]) failures += checkCase(768, "क̈", ["क̈", ""]) failures += checkCase(769, "क", ["क"]) failures += checkCase(770, "क̈", ["क̈"]) failures += checkCase(771, "क🇦", ["क", "🇦"]) failures += checkCase(772, "क̈🇦", ["क̈", "🇦"]) failures += checkCase(773, "क", ["क", ""]) failures += checkCase(774, "क̈", ["क̈", ""]) failures += checkCase(775, "कਃ", ["कਃ"]) failures += checkCase(776, "क̈ਃ", ["क̈ਃ"]) failures += checkCase(777, "कᄀ", ["क", "ᄀ"]) failures += checkCase(778, "क̈ᄀ", ["क̈", "ᄀ"]) failures += checkCase(779, "कᅠ", ["क", "ᅠ"]) failures += checkCase(780, "क̈ᅠ", ["क̈", "ᅠ"]) failures += checkCase(781, "कᆨ", ["क", "ᆨ"]) failures += checkCase(782, "क̈ᆨ", ["क̈", "ᆨ"]) failures += checkCase(783, "क가", ["क", "가"]) failures += checkCase(784, "क̈가", ["क̈", "가"]) failures += checkCase(785, "क각", ["क", "각"]) failures += checkCase(786, "क̈각", ["क̈", "각"]) failures += checkCase(787, "कः", ["कः"]) failures += checkCase(788, "क̈ः", ["क̈ः"]) failures += checkCase(789, "कऄ", ["क", "ऄ"]) failures += checkCase(790, "क̈ऄ", ["क̈", "ऄ"]) failures += checkCase(791, "कൎ", ["क", "ൎ"]) failures += checkCase(792, "क̈ൎ", ["क̈", "ൎ"]) failures}
graphemecases12.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(793, "कक", ["क", "क"]) failures += checkCase(794, "क̈क", ["क̈", "क"]) failures += checkCase(795, "क⌚", ["क", "⌚"]) failures += checkCase(796, "क̈⌚", ["क̈", "⌚"]) failures += checkCase(797, "क̀", ["क̀"]) failures += checkCase(798, "क̈̀", ["क̈̀"]) failures += checkCase(799, "कऀ", ["कऀ"]) failures += checkCase(800, "क̈ऀ", ["क̈ऀ"]) failures += checkCase(801, "क्", ["क्"]) failures += checkCase(802, "क्̈", ["क्̈"]) failures += checkCase(803, "क", ["क"]) failures += checkCase(804, "क̈", ["क̈"]) failures += checkCase(805, "क", ["क", ""]) failures += checkCase(806, "क̈", ["क̈", ""]) failures += checkCase(807, "⌚ ", ["⌚", " "]) failures += checkCase(808, "⌚̈ ", ["⌚̈", " "]) failures += checkCase(809, "⌚\r", ["⌚", "\r"]) failures += checkCase(810, "⌚̈\r", ["⌚̈", "\r"]) failures += checkCase(811, "⌚\n", ["⌚", "\n"]) failures += checkCase(812, "⌚̈\n", ["⌚̈", "\n"]) failures += checkCase(813, "⌚", ["⌚", ""]) failures += checkCase(814, "⌚̈", ["⌚̈", ""]) failures += checkCase(815, "⌚", ["⌚"]) failures += checkCase(816, "⌚̈", ["⌚̈"]) failures += checkCase(817, "⌚🇦", ["⌚", "🇦"]) failures += checkCase(818, "⌚̈🇦", ["⌚̈", "🇦"]) failures += checkCase(819, "⌚", ["⌚", ""]) failures += checkCase(820, "⌚̈", ["⌚̈", ""]) failures += checkCase(821, "⌚ਃ", ["⌚ਃ"]) failures += checkCase(822, "⌚̈ਃ", ["⌚̈ਃ"]) failures += checkCase(823, "⌚ᄀ", ["⌚", "ᄀ"]) failures += checkCase(824, "⌚̈ᄀ", ["⌚̈", "ᄀ"]) failures += checkCase(825, "⌚ᅠ", ["⌚", "ᅠ"]) failures += checkCase(826, "⌚̈ᅠ", ["⌚̈", "ᅠ"]) failures += checkCase(827, "⌚ᆨ", ["⌚", "ᆨ"]) failures += checkCase(828, "⌚̈ᆨ", ["⌚̈", "ᆨ"]) failures += checkCase(829, "⌚가", ["⌚", "가"]) failures += checkCase(830, "⌚̈가", ["⌚̈", "가"]) failures += checkCase(831, "⌚각", ["⌚", "각"]) failures += checkCase(832, "⌚̈각", ["⌚̈", "각"]) failures += checkCase(833, "⌚ः", ["⌚ः"]) failures += checkCase(834, "⌚̈ः", ["⌚̈ः"]) failures += checkCase(835, "⌚ऄ", ["⌚", "ऄ"]) failures += checkCase(836, "⌚̈ऄ", ["⌚̈", "ऄ"]) failures += checkCase(837, "⌚ൎ", ["⌚", "ൎ"]) failures += checkCase(838, "⌚̈ൎ", ["⌚̈", "ൎ"]) failures += checkCase(839, "⌚क", ["⌚", "क"]) failures += checkCase(840, "⌚̈क", ["⌚̈", "क"]) failures += checkCase(841, "⌚⌚", ["⌚", "⌚"]) failures += checkCase(842, "⌚̈⌚", ["⌚̈", "⌚"]) failures += checkCase(843, "⌚̀", ["⌚̀"]) failures += checkCase(844, "⌚̈̀", ["⌚̈̀"]) failures += checkCase(845, "⌚ऀ", ["⌚ऀ"]) failures += checkCase(846, "⌚̈ऀ", ["⌚̈ऀ"]) failures += checkCase(847, "⌚्", ["⌚्"]) failures += checkCase(848, "⌚्̈", ["⌚्̈"]) failures += checkCase(849, "⌚", ["⌚"]) failures += checkCase(850, "⌚̈", ["⌚̈"]) failures += checkCase(851, "⌚", ["⌚", ""]) failures += checkCase(852, "⌚̈", ["⌚̈", ""]) failures += checkCase(853, "̀ ", ["̀", " "]) failures += checkCase(854, "̀̈ ", ["̀̈", " "]) failures += checkCase(855, "̀\r", ["̀", "\r"]) failures += checkCase(856, "̀̈\r", ["̀̈", "\r"]) failures}
graphemecases13.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(857, "̀\n", ["̀", "\n"]) failures += checkCase(858, "̀̈\n", ["̀̈", "\n"]) failures += checkCase(859, "̀", ["̀", ""]) failures += checkCase(860, "̀̈", ["̀̈", ""]) failures += checkCase(861, "̀", ["̀"]) failures += checkCase(862, "̀̈", ["̀̈"]) failures += checkCase(863, "̀🇦", ["̀", "🇦"]) failures += checkCase(864, "̀̈🇦", ["̀̈", "🇦"]) failures += checkCase(865, "̀", ["̀", ""]) failures += checkCase(866, "̀̈", ["̀̈", ""]) failures += checkCase(867, "̀ਃ", ["̀ਃ"]) failures += checkCase(868, "̀̈ਃ", ["̀̈ਃ"]) failures += checkCase(869, "̀ᄀ", ["̀", "ᄀ"]) failures += checkCase(870, "̀̈ᄀ", ["̀̈", "ᄀ"]) failures += checkCase(871, "̀ᅠ", ["̀", "ᅠ"]) failures += checkCase(872, "̀̈ᅠ", ["̀̈", "ᅠ"]) failures += checkCase(873, "̀ᆨ", ["̀", "ᆨ"]) failures += checkCase(874, "̀̈ᆨ", ["̀̈", "ᆨ"]) failures += checkCase(875, "̀가", ["̀", "가"]) failures += checkCase(876, "̀̈가", ["̀̈", "가"]) failures += checkCase(877, "̀각", ["̀", "각"]) failures += checkCase(878, "̀̈각", ["̀̈", "각"]) failures += checkCase(879, "̀ः", ["̀ः"]) failures += checkCase(880, "̀̈ः", ["̀̈ः"]) failures += checkCase(881, "̀ऄ", ["̀", "ऄ"]) failures += checkCase(882, "̀̈ऄ", ["̀̈", "ऄ"]) failures += checkCase(883, "̀ൎ", ["̀", "ൎ"]) failures += checkCase(884, "̀̈ൎ", ["̀̈", "ൎ"]) failures += checkCase(885, "̀क", ["̀", "क"]) failures += checkCase(886, "̀̈क", ["̀̈", "क"]) failures += checkCase(887, "̀⌚", ["̀", "⌚"]) failures += checkCase(888, "̀̈⌚", ["̀̈", "⌚"]) failures += checkCase(889, "̀̀", ["̀̀"]) failures += checkCase(890, "̀̈̀", ["̀̈̀"]) failures += checkCase(891, "̀ऀ", ["̀ऀ"]) failures += checkCase(892, "̀̈ऀ", ["̀̈ऀ"]) failures += checkCase(893, "्̀", ["्̀"]) failures += checkCase(894, "्̀̈", ["्̀̈"]) failures += checkCase(895, "̀", ["̀"]) failures += checkCase(896, "̀̈", ["̀̈"]) failures += checkCase(897, "̀", ["̀", ""]) failures += checkCase(898, "̀̈", ["̀̈", ""]) failures += checkCase(899, "ऀ ", ["ऀ", " "]) failures += checkCase(900, "ऀ̈ ", ["ऀ̈", " "]) failures += checkCase(901, "ऀ\r", ["ऀ", "\r"]) failures += checkCase(902, "ऀ̈\r", ["ऀ̈", "\r"]) failures += checkCase(903, "ऀ\n", ["ऀ", "\n"]) failures += checkCase(904, "ऀ̈\n", ["ऀ̈", "\n"]) failures += checkCase(905, "ऀ", ["ऀ", ""]) failures += checkCase(906, "ऀ̈", ["ऀ̈", ""]) failures += checkCase(907, "ऀ", ["ऀ"]) failures += checkCase(908, "ऀ̈", ["ऀ̈"]) failures += checkCase(909, "ऀ🇦", ["ऀ", "🇦"]) failures += checkCase(910, "ऀ̈🇦", ["ऀ̈", "🇦"]) failures += checkCase(911, "ऀ", ["ऀ", ""]) failures += checkCase(912, "ऀ̈", ["ऀ̈", ""]) failures += checkCase(913, "ऀਃ", ["ऀਃ"]) failures += checkCase(914, "ऀ̈ਃ", ["ऀ̈ਃ"]) failures += checkCase(915, "ऀᄀ", ["ऀ", "ᄀ"]) failures += checkCase(916, "ऀ̈ᄀ", ["ऀ̈", "ᄀ"]) failures += checkCase(917, "ऀᅠ", ["ऀ", "ᅠ"]) failures += checkCase(918, "ऀ̈ᅠ", ["ऀ̈", "ᅠ"]) failures += checkCase(919, "ऀᆨ", ["ऀ", "ᆨ"]) failures += checkCase(920, "ऀ̈ᆨ", ["ऀ̈", "ᆨ"]) failures}
graphemecases14.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(921, "ऀ가", ["ऀ", "가"]) failures += checkCase(922, "ऀ̈가", ["ऀ̈", "가"]) failures += checkCase(923, "ऀ각", ["ऀ", "각"]) failures += checkCase(924, "ऀ̈각", ["ऀ̈", "각"]) failures += checkCase(925, "ऀः", ["ऀः"]) failures += checkCase(926, "ऀ̈ः", ["ऀ̈ः"]) failures += checkCase(927, "ऀऄ", ["ऀ", "ऄ"]) failures += checkCase(928, "ऀ̈ऄ", ["ऀ̈", "ऄ"]) failures += checkCase(929, "ऀൎ", ["ऀ", "ൎ"]) failures += checkCase(930, "ऀ̈ൎ", ["ऀ̈", "ൎ"]) failures += checkCase(931, "ऀक", ["ऀ", "क"]) failures += checkCase(932, "ऀ̈क", ["ऀ̈", "क"]) failures += checkCase(933, "ऀ⌚", ["ऀ", "⌚"]) failures += checkCase(934, "ऀ̈⌚", ["ऀ̈", "⌚"]) failures += checkCase(935, "ऀ̀", ["ऀ̀"]) failures += checkCase(936, "ऀ̈̀", ["ऀ̈̀"]) failures += checkCase(937, "ऀऀ", ["ऀऀ"]) failures += checkCase(938, "ऀ̈ऀ", ["ऀ̈ऀ"]) failures += checkCase(939, "ऀ्", ["ऀ्"]) failures += checkCase(940, "ऀ्̈", ["ऀ्̈"]) failures += checkCase(941, "ऀ", ["ऀ"]) failures += checkCase(942, "ऀ̈", ["ऀ̈"]) failures += checkCase(943, "ऀ", ["ऀ", ""]) failures += checkCase(944, "ऀ̈", ["ऀ̈", ""]) failures += checkCase(945, "् ", ["्", " "]) failures += checkCase(946, "्̈ ", ["्̈", " "]) failures += checkCase(947, "्\r", ["्", "\r"]) failures += checkCase(948, "्̈\r", ["्̈", "\r"]) failures += checkCase(949, "्\n", ["्", "\n"]) failures += checkCase(950, "्̈\n", ["्̈", "\n"]) failures += checkCase(951, "्", ["्", ""]) failures += checkCase(952, "्̈", ["्̈", ""]) failures += checkCase(953, "्", ["्"]) failures += checkCase(954, "्̈", ["्̈"]) failures += checkCase(955, "्🇦", ["्", "🇦"]) failures += checkCase(956, "्̈🇦", ["्̈", "🇦"]) failures += checkCase(957, "्", ["्", ""]) failures += checkCase(958, "्̈", ["्̈", ""]) failures += checkCase(959, "्ਃ", ["्ਃ"]) failures += checkCase(960, "्̈ਃ", ["्̈ਃ"]) failures += checkCase(961, "्ᄀ", ["्", "ᄀ"]) failures += checkCase(962, "्̈ᄀ", ["्̈", "ᄀ"]) failures += checkCase(963, "्ᅠ", ["्", "ᅠ"]) failures += checkCase(964, "्̈ᅠ", ["्̈", "ᅠ"]) failures += checkCase(965, "्ᆨ", ["्", "ᆨ"]) failures += checkCase(966, "्̈ᆨ", ["्̈", "ᆨ"]) failures += checkCase(967, "्가", ["्", "가"]) failures += checkCase(968, "्̈가", ["्̈", "가"]) failures += checkCase(969, "्각", ["्", "각"]) failures += checkCase(970, "्̈각", ["्̈", "각"]) failures += checkCase(971, "्ः", ["्ः"]) failures += checkCase(972, "्̈ः", ["्̈ः"]) failures += checkCase(973, "्ऄ", ["्", "ऄ"]) failures += checkCase(974, "्̈ऄ", ["्̈", "ऄ"]) failures += checkCase(975, "्ൎ", ["्", "ൎ"]) failures += checkCase(976, "्̈ൎ", ["्̈", "ൎ"]) failures += checkCase(977, "्क", ["्", "क"]) failures += checkCase(978, "्̈क", ["्̈", "क"]) failures += checkCase(979, "्⌚", ["्", "⌚"]) failures += checkCase(980, "्̈⌚", ["्̈", "⌚"]) failures += checkCase(981, "्̀", ["्̀"]) failures += checkCase(982, "्̈̀", ["्̈̀"]) failures += checkCase(983, "्ऀ", ["्ऀ"]) failures += checkCase(984, "्̈ऀ", ["्̈ऀ"]) failures}
graphemecases15.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(985, "््", ["््"]) failures += checkCase(986, "््̈", ["््̈"]) failures += checkCase(987, "्", ["्"]) failures += checkCase(988, "्̈", ["्̈"]) failures += checkCase(989, "्", ["्", ""]) failures += checkCase(990, "्̈", ["्̈", ""]) failures += checkCase(991, " ", ["", " "]) failures += checkCase(992, "̈ ", ["̈", " "]) failures += checkCase(993, "\r", ["", "\r"]) failures += checkCase(994, "̈\r", ["̈", "\r"]) failures += checkCase(995, "\n", ["", "\n"]) failures += checkCase(996, "̈\n", ["̈", "\n"]) failures += checkCase(997, "", ["", ""]) failures += checkCase(998, "̈", ["̈", ""]) failures += checkCase(999, "", [""]) failures += checkCase(1000, "̈", ["̈"]) failures += checkCase(1001, "🇦", ["", "🇦"]) failures += checkCase(1002, "̈🇦", ["̈", "🇦"]) failures += checkCase(1003, "", ["", ""]) failures += checkCase(1004, "̈", ["̈", ""]) failures += checkCase(1005, "ਃ", ["ਃ"]) failures += checkCase(1006, "̈ਃ", ["̈ਃ"]) failures += checkCase(1007, "ᄀ", ["", "ᄀ"]) failures += checkCase(1008, "̈ᄀ", ["̈", "ᄀ"]) failures += checkCase(1009, "ᅠ", ["", "ᅠ"]) failures += checkCase(1010, "̈ᅠ", ["̈", "ᅠ"]) failures += checkCase(1011, "ᆨ", ["", "ᆨ"]) failures += checkCase(1012, "̈ᆨ", ["̈", "ᆨ"]) failures += checkCase(1013, "가", ["", "가"]) failures += checkCase(1014, "̈가", ["̈", "가"]) failures += checkCase(1015, "각", ["", "각"]) failures += checkCase(1016, "̈각", ["̈", "각"]) failures += checkCase(1017, "ः", ["ः"]) failures += checkCase(1018, "̈ः", ["̈ः"]) failures += checkCase(1019, "ऄ", ["", "ऄ"]) failures += checkCase(1020, "̈ऄ", ["̈", "ऄ"]) failures += checkCase(1021, "ൎ", ["", "ൎ"]) failures += checkCase(1022, "̈ൎ", ["̈", "ൎ"]) failures += checkCase(1023, "क", ["", "क"]) failures += checkCase(1024, "̈क", ["̈", "क"]) failures += checkCase(1025, "⌚", ["", "⌚"]) failures += checkCase(1026, "̈⌚", ["̈", "⌚"]) failures += checkCase(1027, "̀", ["̀"]) failures += checkCase(1028, "̈̀", ["̈̀"]) failures += checkCase(1029, "ऀ", ["ऀ"]) failures += checkCase(1030, "̈ऀ", ["̈ऀ"]) failures += checkCase(1031, "्", ["्"]) failures += checkCase(1032, "्̈", ["्̈"]) failures += checkCase(1033, "", [""]) failures += checkCase(1034, "̈", ["̈"]) failures += checkCase(1035, "", ["", ""]) failures += checkCase(1036, "̈", ["̈", ""]) failures += checkCase(1037, " ", ["", " "]) failures += checkCase(1038, "̈ ", ["̈", " "]) failures += checkCase(1039, "\r", ["", "\r"]) failures += checkCase(1040, "̈\r", ["̈", "\r"]) failures += checkCase(1041, "\n", ["", "\n"]) failures += checkCase(1042, "̈\n", ["̈", "\n"]) failures += checkCase(1043, "", ["", ""]) failures += checkCase(1044, "̈", ["̈", ""]) failures += checkCase(1045, "", [""]) failures += checkCase(1046, "̈", ["̈"]) failures += checkCase(1047, "🇦", ["", "🇦"]) failures += checkCase(1048, "̈🇦", ["̈", "🇦"]) failures}
graphemecases16.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(1049, "", ["", ""]) failures += checkCase(1050, "̈", ["̈", ""]) failures += checkCase(1051, "ਃ", ["ਃ"]) failures += checkCase(1052, "̈ਃ", ["̈ਃ"]) failures += checkCase(1053, "ᄀ", ["", "ᄀ"]) failures += checkCase(1054, "̈ᄀ", ["̈", "ᄀ"]) failures += checkCase(1055, "ᅠ", ["", "ᅠ"]) failures += checkCase(1056, "̈ᅠ", ["̈", "ᅠ"]) failures += checkCase(1057, "ᆨ", ["", "ᆨ"]) failures += checkCase(1058, "̈ᆨ", ["̈", "ᆨ"]) failures += checkCase(1059, "가", ["", "가"]) failures += checkCase(1060, "̈가", ["̈", "가"]) failures += checkCase(1061, "각", ["", "각"]) failures += checkCase(1062, "̈각", ["̈", "각"]) failures += checkCase(1063, "ः", ["ः"]) failures += checkCase(1064, "̈ः", ["̈ः"]) failures += checkCase(1065, "ऄ", ["", "ऄ"]) failures += checkCase(1066, "̈ऄ", ["̈", "ऄ"]) failures += checkCase(1067, "ൎ", ["", "ൎ"]) failures += checkCase(1068, "̈ൎ", ["̈", "ൎ"]) failures += checkCase(1069, "क", ["", "क"]) failures += checkCase(1070, "̈क", ["̈", "क"]) failures += checkCase(1071, "⌚", ["", "⌚"]) failures += checkCase(1072, "̈⌚", ["̈", "⌚"]) failures += checkCase(1073, "̀", ["̀"]) failures += checkCase(1074, "̈̀", ["̈̀"]) failures += checkCase(1075, "ऀ", ["ऀ"]) failures += checkCase(1076, "̈ऀ", ["̈ऀ"]) failures += checkCase(1077, "्", ["्"]) failures += checkCase(1078, "्̈", ["्̈"]) failures += checkCase(1079, "", [""]) failures += checkCase(1080, "̈", ["̈"]) failures += checkCase(1081, "", ["", ""]) failures += checkCase(1082, "̈", ["̈", ""]) failures += checkCase(1083, "\r\na\n̈", ["\r\n", "a", "\n", "̈"]) failures += checkCase(1084, "ä", ["ä"]) failures += checkCase(1085, " ن", [" ", "ن"]) failures += checkCase(1086, "ن ", ["ن", " "]) failures += checkCase(1087, "ᄀᄀ", ["ᄀᄀ"]) failures += checkCase(1088, "각ᄀ", ["각", "ᄀ"]) failures += checkCase(1089, "각ᆨᄀ", ["각ᆨ", "ᄀ"]) failures += checkCase(1090, "🇦🇧🇨b", ["🇦🇧", "🇨", "b"]) failures += checkCase(1091, "a🇦🇧🇨b", ["a", "🇦🇧", "🇨", "b"]) failures += checkCase(1092, "a🇦🇧🇨b", ["a", "🇦🇧", "🇨", "b"]) failures += checkCase(1093, "a🇦🇧🇨b", ["a", "🇦", "🇧🇨", "b"]) failures += checkCase(1094, "a🇦🇧🇨🇩b", ["a", "🇦🇧", "🇨🇩", "b"]) failures += checkCase(1095, "a", ["a"]) failures += checkCase(1096, "äb", ["ä", "b"]) failures += checkCase(1097, "aःb", ["aः", "b"]) failures += checkCase(1098, "ab", ["a", "b"]) failures += checkCase(1099, "👶🏿👶", ["👶🏿", "👶"]) failures += checkCase(1100, "a🏿👶", ["a🏿", "👶"]) failures += checkCase(1101, "a🏿👶🛑", ["a🏿", "👶🛑"]) failures += checkCase(1102, "👶🏿̈👶🏿", ["👶🏿̈👶🏿"]) failures += checkCase(1103, "🛑🛑", ["🛑🛑"]) failures += checkCase(1104, "a🛑", ["a", "🛑"]) failures += checkCase(1105, "✁✁", ["✁✁"]) failures += checkCase(1106, "a✁", ["a", "✁"]) failures += checkCase(1107, "कत", ["क", "त"]) failures += checkCase(1108, "क्त", ["क्त"]) failures += checkCase(1109, "क््त", ["क््त"]) failures += checkCase(1110, "क्त", ["क्त"]) failures += checkCase(1111, "क़्त", ["क़्त"]) failures += checkCase(1112, "क़्त", ["क़्त"]) failures}
graphemecases17.tpzCheck every published Unicode 16 grapheme test rowimport graphemesupport { checkCase }export function run() -> int { let mut failures = 0 failures += checkCase(1113, "क्त्य", ["क्त्य"]) failures += checkCase(1114, "क्a", ["क्", "a"]) failures += checkCase(1115, "a्त", ["a्", "त"]) failures += checkCase(1116, "?्त", ["?्", "त"]) failures += checkCase(1117, "क््त", ["क््त"]) failures}
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력Unicode 16.0.0 grapheme corpus passed
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 스칼라 단위 순회만 제공한다. 글자 단위로 자르려면 경계 규칙을 각 프로그램에서 다시 적용해야 합니다.
이유
화면의 글자 단위로 처리하면서 원래 문자열 데이터를 보존할 수 있습니다.
바뀐 규칙 Choose Unicode grapheme clusters explicitly →
문자열과 배열의 기존 내장 멤버 서명을 이어갑니다
2026년 11월 14일 채택 · 6.0.0 · 확인 중
문제
기존 문자열과 배열을 쓰는 프로그램을 6.0으로 옮길 때 어느 멤버를 그대로 부를 수 있는지 알아야 합니다. 범위 밖 배열 인덱스를 다루는 경우가 그중 하나입니다.
결정
- 별도 결정으로 삭제하거나 이름을 바꾼 경우를 제외하고 5.21 내장 멤버의 서명을 유지합니다.
- 문자열의
codePointAt, split, byteLength와 배열의 get, push, map, filter, reduce의 계약을 명시합니다. Array.get(i)는 Option<T>를 반환합니다. 인덱스가 음수이거나 길이 이상이면 None()입니다.
예제
Read scalar values by scalar index
run · running · 검증 · 미실행
main.tpzRead scalar values by scalar index플레이그라운드 열기 →import std.iofunction show(value: Option<int>) -> string { match (value) { case Some(point) => "{point}" case None() => "none" }}let text = "a가😀"for index in ([-1, 0, 1, 2, 3]) { io.writeLine("{index}: {show(text.codePointAt(index))}")}
기대 출력종료 코드 0
-1: none
0: 97
1: 44032
2: 128512
3: none
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력-1: none0: 971: 440322: 1285123: none
이 예제는 아직 실행하지 않았습니다.
Compare scalar counts with UTF-8 byte counts
run · running · 검증 · 미실행
main.tpzCompare scalar counts with UTF-8 byte counts플레이그라운드 열기 →import std.iofor text in (["", "a", "가", "😀", "a가😀"]) { io.writeLine("{text.scalars().length} {text.byteLength()}")}
기대 출력종료 코드 0
0 0
1 1
1 3
1 4
3 8
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
Keep empty pieces between separators
run · running · 검증 · 미실행
main.tpzKeep empty pieces between separators플레이그라운드 열기 →import std.iofunction show(pieces: Array<string>) -> string { "{pieces.length} [{pieces.join("|")}]"}io.writeLine(show("a,b,,c,".split(",")))io.writeLine(show("a::b".split("::")))io.writeLine(show("aaa".split("aa")))io.writeLine(show("plain".split(",")))io.writeLine(show("".split(",")))let text = ",x,"io.writeLine("{text.split(",").join(",") == text}")
기대 출력종료 코드 0
5 [a|b||c|]
2 [a|b]
2 [|a]
1 [plain]
1 []
true
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력5 [a|b||c|]2 [a|b]2 [|a]1 [plain]1 []true
이 예제는 아직 실행하지 않았습니다.
Read elements without faulting at the edges
run · running · 검증 · 미실행
main.tpzRead elements without faulting at the edges플레이그라운드 열기 →import std.iolet names = ["a", "b", "c"]for index in ([-1, 0, 2, 3]) { match (names.get(index)) { case Some(name) => io.writeLine("{index}: {name}") case None() => io.writeLine("{index}: none") }}let empty: Array<string> = []io.writeLine("{empty.length}: {empty.get(0) ?? "none"}")
기대 출력종료 코드 0
-1: none
0: a
2: c
3: none
0: none
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력-1: none0: a2: c3: none0: none
이 예제는 아직 실행하지 않았습니다.
Append elements to a mutable array
run · running · 검증 · 미실행
main.tpzAppend elements to a mutable array플레이그라운드 열기 →import std.iolet mut names: Array<string> = []io.writeLine("{names.length}")names.push("a")names.push("b")io.writeLine("{names.length}: {names.join(",")}")
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력이 예제는 아직 실행하지 않았습니다.
검토한 대안
get을 색인과 합치거나 문자열 split을 정규 표현식 split에 합친다. 범위 밖에서 값을 돌려주는 접근과 오류를 내는 접근, 문자 구분자와 패턴 구분자는 서로 다른 작업입니다.- 멤버 이름이나 서명을 6.0에서 다시 정한다. 바꿔서 같은 일을 하는 방법이 하나로 줄어드는 곳이 없습니다.
이유
기존 소스에서 호출을 유지하고 접근과 분할에 맞는 멤버를 고를 수 있습니다.
바뀐 규칙 Read code points, byte counts and separated pieces →Read, count and append array elements →
문자열 정수 변환은 ASCII 숫자와 앞의 빼기 기호를 받습니다
2026년 11월 14일 채택 · 6.0.0 · 구현 중
문제
외부 입력에서 정수를 읽을 때 공백이나 더하기 기호를 받아들이는지 명세에 정해져야 합니다. 범위를 넘은 숫자를 구별하는 결과도 필요합니다.
결정
string.toInt()는 ASCII 10진 숫자 앞에 선택적인 -만 허용합니다.- 공백,
+, 구분자, 접두사와 범위 밖 값은 None()을 반환합니다.
예제
Parse a minus sign and decimal digits
run · running · 검증 · 미실행
main.tpzParse a minus sign and decimal digits플레이그라운드 열기 →import std.iofunction show(text: string) -> string { match (text.toInt()) { case Some(value) => "{value}" case None() => "none" }}for text in (["42", "-7", "007", "-0", "9223372036854775807", "-9223372036854775808"]) { io.writeLine("[{text}] {show(text)}")}
기대 출력종료 코드 0
[42] 42
[-7] -7
[007] 7
[-0] 0
[9223372036854775807] 9223372036854775807
[-9223372036854775808] -9223372036854775808
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력[42] 42[-7] -7[007] 7[-0] 0[9223372036854775807] 9223372036854775807[-9223372036854775808] -9223372036854775808
이 예제는 아직 실행하지 않았습니다.
Return None() for other spellings and out-of-range values
run · running · 검증 · 미실행
main.tpzReturn None() for other spellings and out-of-range values플레이그라운드 열기 →import std.iofunction show(text: string) -> string { match (text.toInt()) { case Some(value) => "{value}" case None() => "none" }}for text in (["", "-", "12a", "1_000", "0x10", "1e3", "١٢", "9223372036854775808", "-9223372036854775809"]) { io.writeLine("[{text}] {show(text)}")}
기대 출력종료 코드 0
[] none
[-] none
[12a] none
[1_000] none
[0x10] none
[1e3] none
[١٢] none
[9223372036854775808] none
[-9223372036854775809] none
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력[] none[-] none[12a] none[1_000] none[0x10] none[1e3] none[١٢] none[9223372036854775808] none[-9223372036854775809] none
이 예제는 아직 실행하지 않았습니다.
Return None() for surrounding whitespace and a plus sign
run · running · 검증 · 미실행
main.tpzReturn None() for surrounding whitespace and a plus signimport std.iofunction show(text: string) -> string { match (text.toInt()) { case Some(value) => "{value}" case None() => "none" }}for text in ([" 12", "12 ", "+5"]) { io.writeLine("[{text}] {show(text)}")}
기대 출력종료 코드 0
[ 12] none
[12 ] none
[+5] none
기대 결과
기대 결과
실행을 마칩니다. 종료 코드 0.
표준 오류 출력 없음.
기대 표준 출력[ 12] none[12 ] none[+5] none
이 예제는 아직 실행하지 않았습니다.
검토한 대안
- 공백을 잘라 내고 앞의
+를 받는다. 같은 값에 여러 입력 철자를 허용하게 됩니다.
이유
입력에서 허용하는 철자와 실패 처리 방법을 코드 작성 전에 알 수 있습니다.
바뀐 규칙 Parse decimal integers with one spelling →