diff options
Diffstat (limited to 'spec/inputs/test/format_spec.yue')
| -rw-r--r-- | spec/inputs/test/format_spec.yue | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/inputs/test/format_spec.yue b/spec/inputs/test/format_spec.yue index afe9331..8c6096a 100644 --- a/spec/inputs/test/format_spec.yue +++ b/spec/inputs/test/format_spec.yue | |||
| @@ -113,6 +113,7 @@ files = [ | |||
| 113 | "spec/inputs/test/loops_spec.yue" | 113 | "spec/inputs/test/loops_spec.yue" |
| 114 | "spec/inputs/test/if_assignment_spec.yue" | 114 | "spec/inputs/test/if_assignment_spec.yue" |
| 115 | "spec/inputs/test/tables_advanced_spec.yue" | 115 | "spec/inputs/test/tables_advanced_spec.yue" |
| 116 | "spec/inputs/test/break_multiple_values_spec.yue" | ||
| 116 | "spec/inputs/unicode/macro_export.yue" | 117 | "spec/inputs/unicode/macro_export.yue" |
| 117 | "spec/inputs/unicode/attrib.yue" | 118 | "spec/inputs/unicode/attrib.yue" |
| 118 | "spec/inputs/unicode/macro.yue" | 119 | "spec/inputs/unicode/macro.yue" |
| @@ -179,11 +180,13 @@ for file in *files | |||
| 179 | code = f\read "a*" | 180 | code = f\read "a*" |
| 180 | f\close! | 181 | f\close! |
| 181 | 182 | ||
| 182 | original_ast = yue.to_ast code | 183 | original_ast, err = yue.to_ast code |
| 184 | assert.is_nil err | ||
| 183 | assert.is_not_nil original_ast | 185 | assert.is_not_nil original_ast |
| 184 | rewriteLineCol original_ast | 186 | rewriteLineCol original_ast |
| 185 | formated = yue.format code, 0, true | 187 | formated = yue.format code, 0, true |
| 186 | ast = yue.to_ast formated | 188 | ast, err = yue.to_ast formated |
| 189 | assert.is_nil err | ||
| 187 | assert.is_not_nil ast | 190 | assert.is_not_nil ast |
| 188 | rewriteLineCol ast | 191 | rewriteLineCol ast |
| 189 | assert.same original_ast, ast | 192 | assert.same original_ast, ast |
