Adding modding folder with a hacked build.

This commit is contained in:
ml
2026-09-26 08:53:08 +02:00
parent cdb960dc71
commit c91080aba7
755 changed files with 50424 additions and 0 deletions
@@ -0,0 +1,27 @@
package text_test
import (
"testing"
"github.com/inkyblackness/hacked/ss1/content/text"
"github.com/stretchr/testify/assert"
)
func TestDefaultCodepageEncode(t *testing.T) {
result := text.DefaultCodepage().Encode("ä")
assert.Equal(t, []byte{132, 0x00}, result)
}
func TestDefaultCodepageDecode(t *testing.T) {
result := text.DefaultCodepage().Decode([]byte{144, 225, 0x00})
assert.Equal(t, "Éß", result)
}
func TestDefaultCodepageMapsUnknownCharacterToQuestionMark(t *testing.T) {
result := text.DefaultCodepage().Encode("„quoted”")
assert.Equal(t, []byte{0x3F, 0x71, 0x75, 0x6F, 0x74, 0x65, 0x64, 0x3F, 0x00}, result)
}