Simple roundtrip from ipptool works.
This commit is contained in:
29
packages/ipp/response_test.go
Normal file
29
packages/ipp/response_test.go
Normal 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)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user