Skip to content

Commit 976cfb3

Browse files
committed
No more panics
1 parent 7f500f4 commit 976cfb3

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

ghdoc_test.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,7 @@ func TestGrabTocDepth(t *testing.T) {
180180
Depth: 1,
181181
Indent: 2,
182182
}
183-
// DEBUG BEGIN
184-
log.Printf("*** CHUCK: ==========")
185-
// DEBUG END
186183
toc := *doc.GrabToc()
187-
// DEBUG BEGIN
188-
log.Printf("*** CHUCK toc: ")
189-
for idx, item := range toc {
190-
log.Printf("*** CHUCK %d: %+#v", idx, item)
191-
}
192-
// DEBUG END
193184
for i := 0; i <= len(tocExpected)-1; i++ {
194185
if toc[i] != tocExpected[i] {
195186
t.Error("Res :", toc[i], "\nExpected :", tocExpected[i])
@@ -219,7 +210,7 @@ func TestGrabTocStartDepth(t *testing.T) {
219210
<p>Blabla...</p>
220211
221212
<h3>
222-
<a id="user-content-the-command-foo3-is-even-betterer" class="anchor" href="#the-command-foo3-is-even-betterer" aria-hidden="true"><span class="octicon octicon-link"></span></a>The command <code>foo3</code> is even betterer</h2>
213+
<a id="user-content-the-command-foo3-is-even-betterer" class="anchor" href="#the-command-foo3-is-even-betterer" aria-hidden="true"><span class="octicon octicon-link"></span></a>The command <code>foo3</code> is even betterer</h3>
223214
224215
<p>Blabla...</p>
225216
@@ -235,16 +226,24 @@ func TestGrabTocStartDepth(t *testing.T) {
235226
<p>Blabla...</p>
236227
237228
<h3>
238-
<a id="user-content-the-command-bar3-is-even-betterer" class="anchor" href="#the-command-bar3-is-even-betterer" aria-hidden="true"><span class="octicon octicon-link"></span></a>The command <code>bar3</code> is even betterer</h2>
229+
<a id="user-content-the-command-bar3-is-even-betterer" class="anchor" href="#the-command-bar3-is-even-betterer" aria-hidden="true"><span class="octicon octicon-link"></span></a>The command <code>bar3</code> is even betterer</h3>
239230
240231
<p>Blabla...</p>
241232
`, AbsPaths: false,
242233
Escape: true,
243234
StartDepth: 1,
244235
Indent: 2,
245236
}
237+
// DEBUG BEGIN
238+
log.Printf("*** CHUCK: =======")
239+
// DEBUG END
246240
toc := *doc.GrabToc()
247-
241+
// DEBUG BEGIN
242+
log.Printf("*** CHUCK toc: ")
243+
for idx, item := range toc {
244+
log.Printf("*** CHUCK %d: %+#v", idx, item)
245+
}
246+
// DEBUG END
248247
for i := 0; i <= len(tocExpected)-1; i++ {
249248
if toc[i] != tocExpected[i] {
250249
t.Error("Res :", toc[i], "\nExpected :", tocExpected[i])

0 commit comments

Comments
 (0)