projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95a9251
)
Test zu SL::Request::unflatten, der prüft, ob nicht Hash-Keys erzeugt werden.
author
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Tue, 12 Jan 2016 10:54:56 +0000
(11:54 +0100)
committer
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Fri, 11 Mar 2016 11:45:30 +0000
(12:45 +0100)
Nicht, dass in einem Array aus Hashes key in einem Hash auftauchen, die nur in
einem anderen drin sind.
t/request/flatten.t
patch
|
blob
|
history
diff --git
a/t/request/flatten.t
b/t/request/flatten.t
index
590f5cf
..
60b2d33
100644
(file)
--- a/
t/request/flatten.t
+++ b/
t/request/flatten.t
@@
-45,6
+45,15
@@
f { a => [ { c => 1, d => 2 }, { c => 3, d => 4 }, ] },
[ 'a[].d', 4 ],
], 'array of hashes';
+f { a => [ { a => 1, b => 2 }, { a => 3, c => 4 }, ] },
+[
+ [ 'a[+].a', 1 ],
+ [ 'a[].b', 2 ],
+ [ 'a[+].a', 3 ],
+ [ 'a[].c', 4 ],
+], 'array of hashes with not existing keys';
+
+
# tests from Hash::Flatten below
f {
'x' => 1,