After commit c018f5fd29 Fenrir is being switched over to go. If you do not want to be part of the testing process, please switch to master.

This commit is contained in:
Storm Dragon committed 2026-10-27 20:30:55 -04:00
1 parent c018f5fd29
commit 0e50de4c76
1047 files changed
+58364 -63747

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
// Copyright (c) 2026 Storm Dragon
// SPDX-License-Identifier: GPL-3.0-or-later
package presentation
import "testing"
func TestIndentationCountsVisibleWhitespaceAndIgnoresBlankRows(t *testing.T) {
for _, trial := range []struct {
text string
level int
valid bool
}{
{"value", 0, true}, {" value ", 4, true}, {" \tvalue", 8, true},
{"\t \tvalue", 16, true}, {"\u00a0\u2003É", 2, true},
{"", 0, false}, {" ", 0, false}, {"\t ", 0, false},
} {
level, valid := Indentation_level([]rune(trial.text))
if level != trial.level || valid != trial.valid {
t.Fatalf("%q: %d %v", trial.text, level, valid)
}
}
}