Add HomeKit QR code to WebUI #1138 by @mnakada

This commit is contained in:
Alex X
2025-11-18 20:55:17 +03:00
parent 290e8fcfda
commit 42e7a03534
7 changed files with 119 additions and 17 deletions
+18
View File
@@ -0,0 +1,18 @@
package setup
import (
"fmt"
"strconv"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestFormatAlphaNum(t *testing.T) {
value := int64(999)
n := 5
s1 := strings.ToUpper(fmt.Sprintf("%0"+strconv.Itoa(n)+"s", strconv.FormatInt(value, 36)))
s2 := FormatInt36(value, n)
require.Equal(t, s1, s2)
}