Microformats test suite

hCard 7 - extracting tel (telephone) number test

This page test that parsers can extract telephone numbers from different structures. This includes type property and value excerpting test. The IsEqualToPhoneNumber method canonicalises and compares phone numbers.

From: hCard test suite 1.0

Author: Glenn Jones

Tests:

Test Result Comment
vcard[0].tel[0].value IsEqualTo("01273 700100") Should collect the telephone number from the node text
vcard[1].tel[0].value IsEqualToPhoneNumber("01273 700100") Should collect the telephone number from a descendant node with value property
vcard[2].tel[0].type[11] IsEqualToCaseInsensitive("PCS") Should find the type value. Types are case insensitive
vcard[3].tel[0].type[1] HasProperty(false) The second type value "next-door" is incorrect
vcard[4].tel[0].value IsEqualToPhoneNumber("01273 700301") Where a type is specified, but the value is not then the node text is the value

History:

John Doe - 01273 700100:

John Doe - preferred: 01273 700100

John Doe -
home, work, pref, voice, fax, msg, cell, pager, bbs, modem, car, isdn and pcs 01273 700100
home: 01273 700200
John Doe - home next-door 01273 700101
John Doe - home 01273 700301

Some rights reserved