Simple roundtrip from ipptool works.

This commit is contained in:
2020-11-01 20:05:53 +01:00
parent 83f35d045c
commit cadcedf43c
16 changed files with 744 additions and 152 deletions

View File

@@ -0,0 +1,29 @@
package ipp
import (
"fmt"
"testing"
)
func TestMarshalResponseHeader(T *testing.T) {
var h ippResponseHeader
h.versionNumber = 0x0101
h.statusCode = SuccessfulOk
h.requestId = 0xdeadbeef
b := h.marshal()
fmt.Printf("% x\n", b)
}
func TestMarshalCompleteResponse(T *testing.T) {
r := NewResponse(SuccessfulOk, 0xdeadbeef)
a := NewCharSetValue("attributes-charset", "UTF-8")
r.AddPrinterAttribute(a)
b := r.Marshal()
fmt.Printf("% x\n", b)
}