Ticket #685: ticket685_tests.patch

File ticket685_tests.patch, 2.5 KB (added by FND, 4 years ago)

added new and updated existing tests

  • core/tests/jsspec/TiddlyWiki.jsspec.js

    diff --git a/core/tests/jsspec/TiddlyWiki.jsspec.js b/core/tests/jsspec/TiddlyWiki.jsspec.js
    index d827ad5..8196a0c 100644
    a b  
    156156                value_of(actual).should_be(expected); 
    157157        }, 
    158158        'should strip bold markup from slice labels (table notation)': function() { 
    159                 // FAILURE 
    160                 // ticket #370 (http://trac.tiddlywiki.org/ticket/370) 
    161159                var title = "tiddler"; 
    162160                var text = "|''~FooBar:''|baz|"; 
    163161                store.saveTiddler(title, title, text); 
     
    191189                var expected = { "foo.bar": "baz" }; 
    192190                value_of(actual).should_be(expected); 
    193191        }, 
     192        'should allow pipes in slice values (colon notation)': function() { 
     193                var title = "tiddler"; 
     194                var text = "foo: bar|baz"; 
     195                store.saveTiddler(title, title, text); 
     196                var actual = store.calcAllSlices(title); 
     197                var expected = { "foo": "bar|baz" }; 
     198                value_of(actual).should_be(expected); 
     199        }, 
    194200        /*'should ignore additional columns (table notation)': function() { 
    195201                var title = "tiddler"; 
    196202                var text = "|foo|bar|baz|"; 
     
    201207        },*/ 
    202208 
    203209        'should retrieve slices containing PrettyLinks (colon notation)': function() { 
    204                 // FAILURE 
    205                 // ticket #685 (http://trac.tiddlywiki.org/ticket/685) 
    206210                var title = "tiddler"; 
    207211                var text = "foo: lorem [[bar|baz]] ipsum"; 
    208212                store.saveTiddler(title, title, text); 
     
    211215                value_of(actual).should_be(expected); 
    212216        }, 
    213217        'should retrieve slices containing image markup (colon notation)': function() { 
    214                 // FAILURE 
    215                 // ticket #685 (http://trac.tiddlywiki.org/ticket/685) 
    216218                var title = "tiddler"; 
    217219                var text = "foo: lorem [img[qux|bar.baz]] ipsum"; 
    218220                store.saveTiddler(title, title, text); 
     
    221223                value_of(actual).should_be(expected); 
    222224        }, 
    223225 
    224         'should disregard apparent slices within code sections': function() { 
     226        /*'should disregard apparent slices within code sections': function() { 
    225227                // FAILURE 
    226228                // ticket #522 (http://trac.tiddlywiki.org/ticket/522) 
    227229                var title = "tiddler"; 
     
    230232                var actual = store.calcAllSlices(title); 
    231233                var expected = {}; 
    232234                value_of(actual).should_be(expected); 
    233         }, 
     235        },*/ 
    234236        'should disregard slices within JSON structures': function() { 
    235237                var title = "tiddler"; 
    236238                var text = "{\n\tfoo: 'bar'\n}\n";