Pure OCaml Yaml 1.2 reader and writer using Bytesrw

cram

+11 -6
+1
tests/cram/multiple_escapes.yml
··· 1 + text: "Tab:\t Newline:\n Quote:\" Backslash:\\\\"
+9 -6
tests/cram/scalars.t
··· 77 77 $ echo 'text: "Col1\tCol2\tCol3"' | yamlcat --json 78 78 {"text": "Col1\tCol2\tCol3"} 79 79 80 - Double-quoted with backslash escape 80 + Double-quoted with backslash escape (Windows path) 81 + Note: Using YAML file instead of echo to avoid shell interpretation 82 + The echo command would interpret \\ as \ before yamlcat sees it 81 83 82 - $ echo 'path: "C:\\Users\\Name"' | yamlcat --json 83 - Error: invalid hex escape: at line 1, columns 12-12 84 - [1] 84 + $ yamlcat --json windows_path.yml 85 + {"path": "C:\\Users\\Name"} 85 86 86 87 Double-quoted with escaped quote 87 88 ··· 89 90 {"text": "She said \"hello\""} 90 91 91 92 Double-quoted with multiple escape sequences 93 + Note: Using YAML file instead of echo to avoid shell interpretation 94 + The echo command interprets \t and \n before yamlcat sees them 92 95 93 - $ echo 'text: "Tab:\t Newline:\n Quote:\" Backslash:\\\\"' | yamlcat --json 94 - {"text": "Tab:\t Newline: Quote:\" Backslash:\\"} 96 + $ yamlcat --json multiple_escapes.yml 97 + {"text": "Tab:\t Newline:\n Quote:\" Backslash:\\\\"} 95 98 96 99 Empty double-quoted string 97 100
+1
tests/cram/windows_path.yml
··· 1 + path: "C:\\Users\\Name"