test
This commit is contained in:
@@ -151,6 +151,7 @@ const (
|
||||
CommandFileSearch CommandType = "file_search"
|
||||
CommandFileThumb CommandType = "file_thumb"
|
||||
CommandFileUpload CommandType = "file_upload"
|
||||
CommandFileUploadDesktop CommandType = "file_upload_desktop"
|
||||
CommandFileUploadHttp CommandType = "file_upload_http"
|
||||
CommandFileWrite CommandType = "file_write"
|
||||
CommandFileZip CommandType = "file_zip"
|
||||
@@ -361,6 +362,7 @@ var CommandTypes = [...]CommandType{
|
||||
CommandFileSearch,
|
||||
CommandFileThumb,
|
||||
CommandFileUpload,
|
||||
CommandFileUploadDesktop,
|
||||
CommandFileUploadHttp,
|
||||
CommandFileWrite,
|
||||
CommandFileZip,
|
||||
@@ -511,6 +513,7 @@ var CommandVersionSupport = map[CommandType]CommandVersionRange{
|
||||
CommandFileSearch: {Min: 1, Max: 1},
|
||||
CommandFileThumb: {Min: 1, Max: 1},
|
||||
CommandFileUpload: {Min: 1, Max: 1},
|
||||
CommandFileUploadDesktop: {Min: 1, Max: 1},
|
||||
CommandFileUploadHttp: {Min: 1, Max: 1},
|
||||
CommandFileWrite: {Min: 1, Max: 1},
|
||||
CommandFileZip: {Min: 1, Max: 1},
|
||||
|
||||
@@ -6,7 +6,7 @@ func TestGeneratedWireContract(t *testing.T) {
|
||||
if WireProtocolVersion != 1 {
|
||||
t.Fatalf("unexpected wire protocol version: %d", WireProtocolVersion)
|
||||
}
|
||||
if len(CommandTypes) != 142 {
|
||||
if len(CommandTypes) != 143 {
|
||||
t.Fatalf("unexpected command count: %d", len(CommandTypes))
|
||||
}
|
||||
if len(CommandVersionSupport) != len(CommandTypes) {
|
||||
@@ -33,6 +33,9 @@ func TestGeneratedWireContract(t *testing.T) {
|
||||
if !IsCommandType("virtual_window_list") {
|
||||
t.Fatal("virtual_window_list must be a known command")
|
||||
}
|
||||
if !IsCommandType("file_upload_desktop") {
|
||||
t.Fatal("file_upload_desktop must be a known command")
|
||||
}
|
||||
if IsCommandType("not_a_command") {
|
||||
t.Fatal("unknown command was accepted")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user