mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Have dumbindent preserve indent on the first line
This commit is contained in:
1 parent
229a0c5af4
commit
b14e3eae9f
2 files changed
+32
-10
No files matched your search
@@ -31,6 +31,10 @@ func TestFormatBytes(tt *testing.T) {
|
||||
// Braces.
|
||||
src: "foo{\nbar\n }\nbaz\n",
|
||||
want: "foo{\n bar\n}\nbaz\n",
|
||||
}, {
|
||||
// Braces with initial indent, giving every output line +3 spaces.
|
||||
src: " foo{\nbar\n }\nbaz\n",
|
||||
want: " foo{\n bar\n }\n baz\n",
|
||||
}, {
|
||||
// Parentheses.
|
||||
src: "i = (j +\nk)\np = q\n",
|
||||
@@ -61,7 +65,7 @@ func TestFormatBytes(tt *testing.T) {
|
||||
want: "a['key'] = `{\n\n\nX` ;\nb = {\n c = 0\n",
|
||||
}, {
|
||||
// Slash-star comment.
|
||||
src: " a['key'] = /*{\n\n\nX*/ ; \nb = {\nc = 0\n",
|
||||
src: "\n a['key'] = /*{\n\n\nX*/ ; \nb = {\nc = 0\n",
|
||||
want: "a['key'] = /*{\n\n\nX*/ ;\nb = {\n c = 0\n",
|
||||
}, {
|
||||
// Nested blocks with label.
|
||||
|
||||
Reference in new issue
Block a user