Add more tests
This commit is contained in:
@@ -57,22 +57,6 @@ func (c *GSM7Coder) Encode(s string, buf *bytes.Buffer) error {
|
||||
}
|
||||
}
|
||||
return nil
|
||||
// The issue happens during leap
|
||||
// 2024/07/28 16:56:12 Index 7 1 7 11100100 00000000
|
||||
// 2024/07/28 16:56:12 Leap at 7 1 7
|
||||
// 2024/07/28 16:56:12 Index 8 1 7 11000010 00000000
|
||||
// 2024/07/28 16:56:12 Shift at 8 1 7
|
||||
// 2024/07/28 16:56:12 Index 9 2 1 11000010 00111100
|
||||
|
||||
// The correct output should be:
|
||||
// Index 9 2 1 11100001 00111100
|
||||
|
||||
// Also
|
||||
// 2024/07/28 16:58:49 Index 8 1 7 00000000 01100001
|
||||
// 2024/07/28 16:58:49 Index 8 1 7 11000010 00000000
|
||||
// 2024/07/28 16:58:49 Shift at 8 1 7
|
||||
// 2024/07/28 16:58:49 Index 9 2 1 11000010 01111001
|
||||
// 2024/07/28 16:58:49 Index 9 2 1 11000010 00111100 <-- the LSB 1 that is removed is not added to the previous byte (should be 11100001, not 11000010)
|
||||
}
|
||||
|
||||
func (c *GSM7Coder) Decode(buf *bytes.Buffer) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user