Skip to content

Commit 662bd69

Browse files
committed
add failing test to demonstrate #1436
1 parent 29c506c commit 662bd69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/grunt/config_test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ exports.config = {
1818
bar: 'bar',
1919
arr: ['foo', '<%= obj.foo2 %>'],
2020
arr2: ['<%= arr %>', '<%= obj.Arr %>'],
21+
arr3: ['<%= meta %>'],
2122
buffer: new Buffer('test'),
2223
});
2324
done();
@@ -61,7 +62,7 @@ exports.config = {
6162
test.done();
6263
},
6364
'config.get': function(test) {
64-
test.expect(10);
65+
test.expect(13);
6566
test.equal(grunt.config.get('foo'), 'bar', 'Should process templates.');
6667
test.equal(grunt.config.get('foo2'), 'bar', 'Should process templates recursively.');
6768
test.equal(grunt.config.get('obj.foo2'), 'bar', 'Should process deeply nested templates recursively.');
@@ -73,6 +74,9 @@ exports.config = {
7374
var buf = grunt.config.get('buffer');
7475
test.ok(Buffer.isBuffer(buf), 'Should retrieve Buffer instances as Buffer.');
7576
test.deepEqual(buf, new Buffer('test'), 'Should return buffers as-is.');
77+
test.deepEqual(grunt.config.get('arr3.0'), {foo: 'bar', baz: [1, 2, 3]});
78+
test.deepEqual(grunt.config.get('arr3.0').foo, 'bar');
79+
test.deepEqual(grunt.config.get('arr3.0.foo'), 'bar');
7680
test.done();
7781
},
7882
'config.set': function(test) {

0 commit comments

Comments
 (0)