aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-01-25 21:06:57 -0300
committerEuAndreh <eu@euandre.org>2025-01-25 21:06:57 -0300
commit39346467ce203c2e3eebf0fbab687568f5e67119 (patch)
tree27366a9eaca73c59ee3fa80a9ab7f055b205cfdc /tests
parenttests/fiinha.go: Fix typo (diff)
downloadfiinha-39346467ce203c2e3eebf0fbab687568f5e67119.tar.gz
fiinha-39346467ce203c2e3eebf0fbab687568f5e67119.tar.xz
tests/fiinha.go: Add test for `commands` var
Diffstat (limited to 'tests')
-rw-r--r--tests/fiinha.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/fiinha.go b/tests/fiinha.go
index b733935..b7a4cf5 100644
--- a/tests/fiinha.go
+++ b/tests/fiinha.go
@@ -5787,6 +5787,16 @@ func test_runCommand() {
})
}
+func test_commands() {
+ g.TestStart("commands")
+
+ g.Testing("ensure map key and name are in sync", func() {
+ for key, command := range commands {
+ g.TAssertEqual(command.name, key)
+ }
+ })
+}
+
func dumpQueries() {
queries := []struct{name string; fn func(string) queryT}{
@@ -5888,4 +5898,5 @@ func MainTest() {
test_usage()
test_getopt()
test_runCommand()
+ test_commands()
}