-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed an issue with the end of m+ panel
- Loading branch information
Showing
5 changed files
with
138 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
--this file isn't loaded, the tests need to be copied, loaded and run. | ||
|
||
function PackTest() | ||
local table = {1, 2, 3, 4, 5} | ||
local packed = DetailsFramework.table.pack(table) | ||
print("Testing table.pack, table: {1, 2, 3, 4, 5}") | ||
local expected = "\"5,1,2,3,4,5\"" | ||
print("Expected: string ", expected) | ||
print("Result: " .. type(packed) .. " \"" .. packed .. "\"") | ||
end | ||
|
||
function PackSubTest() | ||
local table = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} } | ||
local packed = DetailsFramework.table.packsub(table) | ||
print("Testing table.packsub, table: { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} }") | ||
local expected = "\"3,1,2,3,3,4,5,6,3,7,8,9\"" | ||
print("Expected: string ", expected) | ||
print("Result: " .. type(packed) .. " \"" .. packed .. "\"") | ||
end | ||
|
||
function PackSubMergeTest() | ||
local table = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} } | ||
local packed = DetailsFramework.table.packsubmerge(table) | ||
print("Testing table.packsubmerge, table: { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} }") | ||
local expected = "\"9,1,2,3,4,5,6,7,8,9\"" | ||
print("Expected: string ", expected) | ||
print("Result: " .. type(packed) .. " \"" .. packed .. "\"") | ||
end | ||
|
||
function UnpackTest() | ||
local packed = "5,1,2,3,4,5" | ||
local table, nextIndex = DetailsFramework.table.unpack(packed) | ||
print("Testing table.unpack, data: \"5,1,2,3,4,5\"") | ||
local expected = "table {1, 2, 3, 4, 5}, 0" | ||
print("Expected:", expected) | ||
print("Result: " .. type(table) .. " {" .. table[1] .. ", " .. table[2] .. ", " .. table[3] .. ", " .. table[4] .. ", " .. table[5] .. "},", nextIndex) | ||
end | ||
|
||
function UnpackSecondTest() | ||
local packed = "5,1,2,3,4,5,2,5,4,3,1,2,3" | ||
local table, nextIndex = DetailsFramework.table.unpack(packed, 7) | ||
print("Testing table.unpack with Idx 7, data: \"5,1,2,3,4,5,2,5,4,3,1,2,3\"") | ||
local expected = "table {5, 4}, 10" | ||
print("Expected:", expected) | ||
print("Result: " .. type(table) .. " {" .. table[1] .. ", " .. table[2] .. "},", nextIndex) | ||
end | ||
|
||
function UnpackSubTest() | ||
local packed = "3,1,2,3,3,4,5,6,3,7,8,9" | ||
local tables = DetailsFramework.table.unpacksub(packed) | ||
print("Testing table.unpacksub, data: \"3,1,2,3,3,4,5,6,3,7,8,9\"") | ||
local expected = "table {table {1, 2, 3}, table {4, 5, 6}, table {7, 8, 9}}" | ||
print("Expected:", expected) | ||
print("Result: " .. type(tables) .. " {" .. type(tables[1]) .. " {" .. tables[1][1] .. ", " .. tables[1][2] .. ", " .. tables[1][3] .. "}, " .. type(tables[2]) .. " {" .. tables[2][1] .. ", " .. tables[2][2] .. ", " .. tables[2][3] .. "}, " .. type(tables[3]) .. " {" .. tables[3][1] .. ", " .. tables[3][2] .. ", " .. tables[3][3] .. "}}") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters