var vCard = require( '..' )
var fs = require( 'fs' )
var assert = require( 'assert' )

suite( 'vCard', function() {
  
  suite( 'Character Sets', function() {
    
    test( 'charset should not be part of value', function() {
      var data = fs.readFileSync( __dirname + '/data/xing.vcf' )
      var card = new vCard( data )
      assert.strictEqual( typeof card.fn, 'object' )
      assert.strictEqual( card.fn.data.indexOf( 'CHARSET' ), -1 )
    })
    
  })
  
  suite( 'Photo URL', function() {
    
    test( 'URL parameters should not become object properties', function() {
      var data = fs.readFileSync( __dirname + '/data/xing.vcf' )
      var card = new vCard( data )
      assert.equal( card.photo.txtsize, null )
    })
    
  })
  
})

@@ -742,11 +742,1466 @@
   %7D)%0A  %0A
+  suite( 'Markers', function() %7B%0A    %0A    test( 'should throw on missing BEGIN marker', function() %7B%0A      var data = 'VERSION:4.0%5CnURL;TYPE=work:http://www.example.comEND:VCARD%5Cn'%0A      assert.throws( function() %7B%0A        vCard.parse( data )%0A      %7D)%0A    %7D)%0A    %0A    test( 'should throw on misplaced BEGIN marker', function() %7B%0A      var data = 'VERSION:4.0%5CnBEGIN:VCARD%5CnURL;TYPE=work:http://www.example.comEND:VCARD%5Cn'%0A      assert.throws( function() %7B%0A        vCard.parse( data )%0A      %7D)%0A    %7D)%0A    %0A    test( 'should throw on missing VERSION marker', function() %7B%0A      var data = 'BEGIN:VCARD%5CnURL;TYPE=work:http://www.example.comEND:VCARD%5Cn'%0A      assert.throws( function() %7B%0A        vCard.parse( data )%0A      %7D)%0A    %7D)%0A    %0A    test( 'should throw on misplaced VERSION marker', function() %7B%0A      var data = 'BEGIN:VCARD%5CnURL;TYPE=work:http://www.example.com%5CnVERSION:4.0%5CnEND:VCARD%5Cn'%0A      assert.throws( function() %7B%0A        vCard.parse( data )%0A      %7D)%0A    %7D)%0A    %0A    test( 'should throw on missing END marker', function() %7B%0A      var data = 'BEGIN:VCARD%5CnVERSION:4.0%5CnURL;TYPE=work:http://www.example.com%5Cn'%0A      assert.throws( function() %7B%0A        vCard.parse( data )%0A      %7D)%0A    %7D)%0A    %0A    test( 'should throw on misplaced END marker', function() %7B%0A      var data = 'BEGIN:VCARD%5CnVERSION:4.0%5CnEND:VCARD%5CnURL;TYPE=work:http://www.example.com%5Cn'%0A      assert.throws( function() %7B%0A        vCard.parse( data )%0A      %7D)%0A    %7D)%0A    %0A  %7D)%0A  %0A
 %7D)%0A

Update test: Add marker tests