From 095e23ddad3b7c4cab7019e9447de694aa722b30 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 18 Sep 2023 14:03:32 -0700 Subject: [PATCH] save test --- d2compiler/compile_test.go | 6 +++-- .../TestCompile/text_no_label.exp.json | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 testdata/d2compiler/TestCompile/text_no_label.exp.json diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 98045e996..608d92c97 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -2732,8 +2732,10 @@ g: |md | `, - expErr: ` -`, + expErr: `d2/testdata/d2compiler/TestCompile/text_no_label.d2:14:1: block string cannot be empty +d2/testdata/d2compiler/TestCompile/text_no_label.d2:15:1: block string cannot be empty +d2/testdata/d2compiler/TestCompile/text_no_label.d2:4:1: shape text must have a non-empty label +d2/testdata/d2compiler/TestCompile/text_no_label.d2:7:1: shape text must have a non-empty label`, }, } diff --git a/testdata/d2compiler/TestCompile/text_no_label.exp.json b/testdata/d2compiler/TestCompile/text_no_label.exp.json new file mode 100644 index 000000000..d0a3956b0 --- /dev/null +++ b/testdata/d2compiler/TestCompile/text_no_label.exp.json @@ -0,0 +1,23 @@ +{ + "graph": null, + "err": { + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/text_no_label.d2,13:0:110-13:9:119", + "errmsg": "d2/testdata/d2compiler/TestCompile/text_no_label.d2:14:1: block string cannot be empty" + }, + { + "range": "d2/testdata/d2compiler/TestCompile/text_no_label.d2,14:0:120-16:1:129", + "errmsg": "d2/testdata/d2compiler/TestCompile/text_no_label.d2:15:1: block string cannot be empty" + }, + { + "range": "d2/testdata/d2compiler/TestCompile/text_no_label.d2,3:0:25-5:1:51", + "errmsg": "d2/testdata/d2compiler/TestCompile/text_no_label.d2:4:1: shape text must have a non-empty label" + }, + { + "range": "d2/testdata/d2compiler/TestCompile/text_no_label.d2,6:0:52-8:1:74", + "errmsg": "d2/testdata/d2compiler/TestCompile/text_no_label.d2:7:1: shape text must have a non-empty label" + } + ] + } +}