open Mocha open Test_utils let () = Console.log("你好") let () = Console.log(`你好`) let () = Console.log(%raw(`"你好"`)) let f = x => switch x { | '' .. 'ÿ' => 0 | 'ō' => 2 | _ => 3 } let spanningSurrogateBlock = x => switch x { | '\u{D7FE}' .. '\u{E001}' => 1 | _ => 0 } describe(__MODULE__, () => { test("switch", () => { eq(__LOC__, f('{'), 0) eq(__LOC__, f('ō'), 2) eq(__LOC__, f('Ƽ'), 3) eq(__LOC__, spanningSurrogateBlock('\u{D7FE}'), 1) eq(__LOC__, spanningSurrogateBlock('\u{E001}'), 1) }) })