summaryrefslogtreecommitdiff
path: root/src/unicode/symbols_table.zig
diff options
context:
space:
mode:
authorJacob Sandlund <jacob@jacobsandlund.com>2025-09-23 10:49:59 -0400
committerJacob Sandlund <jacob@jacobsandlund.com>2025-09-23 10:49:59 -0400
commitc7ad29ca91385f224fabae06f323cd14b48a8656 (patch)
tree1b3758640a0c4ff628619a1412dee47654410429 /src/unicode/symbols_table.zig
parentb5c6c044a724ec161a1793e308531bd82b75d56c (diff)
move tests over to _uucode.zig files to avoid needing deps for vt tests
Diffstat (limited to 'src/unicode/symbols_table.zig')
-rw-r--r--src/unicode/symbols_table.zig46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/unicode/symbols_table.zig b/src/unicode/symbols_table.zig
index da2614cae..034d34428 100644
--- a/src/unicode/symbols_table.zig
+++ b/src/unicode/symbols_table.zig
@@ -1,4 +1,3 @@
-const std = @import("std");
const lut = @import("lut.zig");
/// The lookup tables for Ghostty.
@@ -16,48 +15,3 @@ pub const table = table: {
.stage3 = &generated.stage3,
};
};
-
-test "unicode symbols: tables match uucode" {
- if (std.valgrind.runningOnValgrind() > 0) return error.SkipZigTest;
-
- const uucode = @import("uucode");
- const testing = std.testing;
-
- for (0..std.math.maxInt(u21)) |cp| {
- const t = table.get(@intCast(cp));
- const uu = if (cp > uucode.config.max_code_point)
- false
- else
- uucode.get(.is_symbol, @intCast(cp));
-
- if (t != uu) {
- std.log.warn("mismatch cp=U+{x} t={} uu={}", .{ cp, t, uu });
- try testing.expect(false);
- }
- }
-}
-
-test "unicode symbols: tables match ziglyph" {
- if (std.valgrind.runningOnValgrind() > 0) return error.SkipZigTest;
-
- const ziglyph = @import("ziglyph");
- const testing = std.testing;
-
- for (0..std.math.maxInt(u21)) |cp_usize| {
- const cp: u21 = @intCast(cp_usize);
- const t = table.get(cp);
- const zg = ziglyph.general_category.isPrivateUse(cp) or
- ziglyph.blocks.isDingbats(cp) or
- ziglyph.blocks.isEmoticons(cp) or
- ziglyph.blocks.isMiscellaneousSymbols(cp) or
- ziglyph.blocks.isEnclosedAlphanumerics(cp) or
- ziglyph.blocks.isEnclosedAlphanumericSupplement(cp) or
- ziglyph.blocks.isMiscellaneousSymbolsAndPictographs(cp) or
- ziglyph.blocks.isTransportAndMapSymbols(cp);
-
- if (t != zg) {
- std.log.warn("mismatch cp=U+{x} t={} zg={}", .{ cp, t, zg });
- try testing.expect(false);
- }
- }
-}