BEGIN; SELECT plan(63); SELECT is(xml_famous5_to_text('<'), '<', 'less than simple test'); SELECT isnt(xml_famous5_to_text('<'), '<', 'less than bad syntax'); SELECT is(xml_famous5_to_text('>'), '>', 'greater than simple test'); SELECT isnt(xml_famous5_to_text('>'), '>', 'greater than bad syntax'); SELECT is(xml_famous5_to_text('''), '''', 'apostrophe simple test'); SELECT isnt(xml_famous5_to_text('&apos'), '''', 'apostrohpe bad syntax'); SELECT is(xml_famous5_to_text('"'), '"', 'quotation simple test'); SELECT isnt(xml_famous5_to_text('"'), '"', 'quotation bad syntax'); SELECT is(xml_famous5_to_text('&'), '&', 'ampersand simple test'); SELECT isnt(xml_famous5_to_text('&'), '&', 'ampersand bad syntax'); SELECT is(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five simple test'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five single syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five two syntax errors'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five three syntax errors'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five four syntax errors'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five five syntax errors'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five greater than syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five apostrophe syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than + greater than syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five less than + apostrophe syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than + quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five greater than + apostrophe syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five greater than + quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five greater than + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five apostrophe + quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five apostrophe + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five quotation + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five less than + greater than + apostrophe syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than + greater than + quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than + greater than + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five greater than + apostrophe + quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five greater than + apostrophe + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five apostrophe + quotation+ ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five greater than + apostrophe + quotation + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five less than + apostrophe + quotation + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > ' " &'), '< > '' " &', 'all famous five less than + greater than + quotation + ampersand syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five less than + greater than + apostrophe + quotation syntax error'); SELECT isnt(xml_famous5_to_text('< > &apos " &'), '< > '' " &', 'all famous five less than + greater than + apostrophe + quotation syntax error'); SELECT is(xml_famous5_to_text('< <'), '< <', 'two less thans simple test'); SELECT is(xml_famous5_to_text('> >'), '> >', 'two greater thans simple test'); SELECT is(xml_famous5_to_text('' ''), ''' ''', 'two apostrophes simple test'); SELECT is(xml_famous5_to_text('" "'), '" "', 'two quotations simple test'); SELECT is(xml_famous5_to_text('& &'), '& &', 'two ampersands simple test'); SELECT isnt(xml_famous5_to_text('< <'), '< <', 'two less thans one syntax error'); SELECT isnt(xml_famous5_to_text('> >'), '> >', 'two greater thans one syntax error'); SELECT isnt(xml_famous5_to_text('' &apos'), ''' ''', 'two apostrophes one syntax error'); SELECT isnt(xml_famous5_to_text('" "'), '" "', 'two quotations one syntax error'); SELECT isnt(xml_famous5_to_text('& &'), '& &', 'two ampersands one syntax error'); SELECT is(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'all famous five complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'all famous five one syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'all famous five two syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by &apos. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'all famous five three syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by &apos. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'all famous five four syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by &apos. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'all famous five five syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'less than syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'greater than syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by &apos. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'apostrophe syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'quotation syntax errors complex test'); SELECT isnt(xml_famous5_to_text('One plus one is < one. Two is > one. A possessive is indicated by '. Quotation marks look like ". Ampersands look like &.'), 'One plus one is < one. Two is > one. A possessive is indicated by ''. Quotation marks look like ". Ampersands look like &.', 'ampersand syntax errors complex test'); ROLLBACK;