123456789101112131415 |
- package util
- import (
- "github.com/stretchr/testify/assert"
- "testing"
- )
- func TestMsgFormat(t *testing.T) {
- inptut := `SOFT_VER: 3 uuid: 8 frameid: 0 cowid: 99999999 csq: 10 Temp: 30.56 imei:869678048355757 active : 631 inactive: 0 Rumina: 76 Intake: 0 gasp: 0 other: 11 Remain: 0`
- output := `SOFT_VER:3 uuid:8 frameid:0 cowid:99999999 csq:10 Temp:30.56 imei:869678048355757 active:631 inactive:0 Rumina:76 Intake:0 gasp:0 other:11 Remain:0`
- res := MsgFormat(inptut)
- assert.Equal(t, output, res)
- }
|