Additional unit tests of MetaBin handling
This commit is contained in:
parent
dbceda876c
commit
b49a5ff53d
1 changed files with 38 additions and 13 deletions
|
@ -444,7 +444,8 @@ assemble_index_specs(Indexes, IndexOp) ->
|
||||||
|
|
||||||
|
|
||||||
index_extract_test() ->
|
index_extract_test() ->
|
||||||
SibMetaBin = <<0,0,0,1,0,0,0,0,0,0,0,221,0,0,6,48,0,4,130,247,0,1,250,134,
|
SibMetaBin =
|
||||||
|
<<0,0,0,1,0,0,0,0,0,0,0,221,0,0,6,48,0,4,130,247,0,1,250,134,
|
||||||
1,101,0,0,0,0,4,1,77,68,75,0,0,0,44,0,131,107,0,39,77,68,
|
1,101,0,0,0,0,4,1,77,68,75,0,0,0,44,0,131,107,0,39,77,68,
|
||||||
86,101,49,55,52,55,48,50,55,45,54,50,99,49,45,52,48,57,55,
|
86,101,49,55,52,55,48,50,55,45,54,50,99,49,45,52,48,57,55,
|
||||||
45,97,53,102,50,45,53,54,98,51,98,97,57,57,99,55,56,50,0,0,
|
45,97,53,102,50,45,53,54,98,51,98,97,57,57,99,55,56,50,0,0,
|
||||||
|
@ -459,7 +460,31 @@ index_extract_test() ->
|
||||||
Indexes = get_indexes_from_siblingmetabin(SibMetaBin, []),
|
Indexes = get_indexes_from_siblingmetabin(SibMetaBin, []),
|
||||||
ExpIndexes = [{"idx1_bin","21521107231730Sophia"},
|
ExpIndexes = [{"idx1_bin","21521107231730Sophia"},
|
||||||
{"idx1_bin","21820510130146Avery"}],
|
{"idx1_bin","21820510130146Avery"}],
|
||||||
?assertMatch(ExpIndexes, Indexes).
|
?assertMatch(ExpIndexes, Indexes),
|
||||||
|
SibMetaBinNoIdx =
|
||||||
|
<<0,0,0,1,0,0,0,0,0,0,0,128,0,0,6,48,0,4,130,247,0,1,250,134,
|
||||||
|
1,101,0,0,0,0,4,1,77,68,75,0,0,0,44,0,131,107,0,39,77,68,
|
||||||
|
86,101,49,55,52,55,48,50,55,45,54,50,99,49,45,52,48,57,55,
|
||||||
|
45,97,53,102,50,45,53,54,98,51,98,97,57,57,99,55,56,50,0,0,0,
|
||||||
|
5,1,77,68,75,50,0,0,0,44,0,131,107,0,39,77,68,86,101,49,55,
|
||||||
|
52,55,48,50,55,45,54,50,99,49,45,52,48,57,55,45,97,53,102,
|
||||||
|
50,45,53,54,98,51,98,97,57,57,99,55,56,50>>,
|
||||||
|
?assertMatch([], get_indexes_from_siblingmetabin(SibMetaBinNoIdx, [])),
|
||||||
|
SibMetaBinOverhang =
|
||||||
|
<<0,0,0,1,0,0,0,0,0,0,0,221,0,0,6,48,0,4,130,247,0,1,250,134,
|
||||||
|
1,101,0,0,0,0,4,1,77,68,75,0,0,0,44,0,131,107,0,39,77,68,
|
||||||
|
86,101,49,55,52,55,48,50,55,45,54,50,99,49,45,52,48,57,55,
|
||||||
|
45,97,53,102,50,45,53,54,98,51,98,97,57,57,99,55,56,50,0,0,
|
||||||
|
0,6,1,105,110,100,101,120,0,0,0,79,0,131,108,0,0,0,2,104,2,
|
||||||
|
107,0,8,105,100,120,49,95,98,105,110,107,0,20,50,49,53,50,
|
||||||
|
49,49,48,55,50,51,49,55,51,48,83,111,112,104,105,97,104,2,
|
||||||
|
107,0,8,105,100,120,49,95,98,105,110,107,0,19,50,49,56,50,
|
||||||
|
48,53,49,48,49,51,48,49,52,54,65,118,101,114,121,106,0,0,0,
|
||||||
|
5,1,77,68,75,50,0,0,0,44,0,131,107,0,39,77,68,86,101,49,55,
|
||||||
|
52,55,48,50,55,45,54,50,99,49,45,52,48,57,55,45,97,53,102,
|
||||||
|
50,45,53,54,98,51,98,97,57,57,99,55,56,50,0,0,0,0>>,
|
||||||
|
?assertMatch(ExpIndexes,
|
||||||
|
get_indexes_from_siblingmetabin(SibMetaBinOverhang, [])).
|
||||||
|
|
||||||
diff_index_test() ->
|
diff_index_test() ->
|
||||||
UpdIndexes =
|
UpdIndexes =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue