Start work on width testing kitten

This commit is contained in:
Kovid Goyal
2025-04-10 20:28:43 +05:30
parent 5798d29609
commit cf6bb29ef7
3 changed files with 27 additions and 2 deletions

View File

@@ -1,5 +1,3 @@
//go:build testing
package kitty package kitty
import ( import (

View File

@@ -0,0 +1,25 @@
package cli
import (
"fmt"
)
var _ = fmt.Print
func main() (rc int, err error) {
return
}
func WcswidthKittenEntryPoint(root *Command) {
root.AddSubCommand(&Command{
Name: "__width_test__",
Hidden: true,
OnlyArgsAllowed: true,
Run: func(cmd *Command, args []string) (rc int, err error) {
if len(args) != 0 {
return 1, fmt.Errorf("Usage: __width_test__")
}
return main()
},
})
}

View File

@@ -122,6 +122,8 @@ func KittyToolEntryPoints(root *cli.Command) {
images.ConvertEntryPoint(root) images.ConvertEntryPoint(root)
// __atexit__ // __atexit__
atexit.EntryPoint(root) atexit.EntryPoint(root)
// __width_test__
cli.WcswidthKittenEntryPoint(root)
// __generate_man_pages__ // __generate_man_pages__
root.AddSubCommand(&cli.Command{ root.AddSubCommand(&cli.Command{
Name: "__generate_man_pages__", Name: "__generate_man_pages__",