describe('Search', function() {

    var list, jonny, martina, angelica, sebastian, imma, hasse;

    before(function() {
        list = fixture.list(['name', 'born'], fixture.all);

        jonny = list.get('name', 'Jonny Strömberg')[0];
        martina = list.get('name', 'Martina Elm')[0];
        angelica = list.get('name', 'Angelica Abraham')[0];
        sebastian = list.get('name', 'Sebastian Höglund')[0];
        imma = list.get('name', 'Imma Grafström')[0];
        hasse = list.get('name', 'Hasse Strömberg')[0];
    });

    after(function() {
        fixture.removeList();
    });

    afterEach(function() {
        list.search();
        list.show(1, 200);
    })

    describe('Case-sensitive', function() {
        it('should not be case-sensitive', function() {
            var result = list.search('jonny');
            expect(result.length).to.equal(1);
            expect(result[0]).to.deep.equal(jonny);
        });
    });

    describe('Number of results', function() {
        it('should find jonny, martina, angelice', function() {
            var result = list.search('1986');
            expect(result.length).to.equal(3); // 3!!
            expect(jonny.matching()).to.be.true;
            expect(martina.matching()).to.be.true;
            expect(angelica.matching()).to.be.true;
            expect(sebastian.matching()).to.be.false;
            expect(imma.matching()).to.be.false;
            expect(hasse.matching()).to.be.false;
            list.search();
        });
        it('should find all with utf-8 char ö', function() {
            var result = list.search('ö');
            expect(result.length).to.equal(4); // 4!!
            expect(jonny.matching()).to.be.true;
            expect(martina.matching()).to.be.false;
            expect(angelica.matching()).to.be.false;
            expect(sebastian.matching()).to.be.true;
            expect(imma.matching()).to.be.true;
            expect(hasse.matching()).to.be.true;
        });
    });

    describe('Specfic columns', function() {
        it('should find match in column', function() {
            var result = list.search('jonny', { name: true });
            expect(result.length).to.equal(1);
            expect(result[0]).to.deep.equal(jonny);
        });
        it('should not find match in column', function() {
            var result = list.search('jonny', { born: true });
            expect(result.length).to.equal(0);
        });
        it('should find match in column', function() {
            var result = list.search('jonny', [ 'name' ]);
            expect(result.length).to.equal(1);
            expect(result[0]).to.deep.equal(jonny);
        });
        it('should not find match in column', function() {
            var result = list.search('jonny', [ 'born' ]);
            expect(result.length).to.equal(0);
        });
        it('should work with columns that does not exist', function() {
            var result = list.search('jonny', [ 'pet' ]);
            expect(result.length).to.equal(0);
        });
    });

    describe('Custom search function', function() {
        var customSearchFunction = function(searchString, columns) {
            for (var k = 0, kl = list.items.length; k < kl; k++) {
                if (list.items[k].values().born > 1985) {
                    list.items[k].found = true;
                }
            }
        };
        it('should use custom function in third argument', function() {
            var result = list.search('jonny', [ 'name' ], customSearchFunction);
            expect(result.length).to.equal(4);
        });
        it('should use custom function in second argument', function() {
            var result = list.search('jonny', customSearchFunction);
            expect(result.length).to.equal(4);
        });
    });
});
@@ -672,16 +672,17 @@
 ;%0A    %7D)
+;
 %0A%0A    de
@@ -2130,22 +2130,18 @@
 y', 
-%7B 
+%5B '
 name
-: true %7D
+' %5D
 );%0A 
@@ -2359,22 +2359,18 @@
 y', 
-%7B 
+%5B '
 born
-: true %7D
+' %5D
 );%0A 

Fix legacy column search code