Branch Coverage

TagReader.xs
Criterion Covered Total %
branch 151 408 37.0


line true false branch
65 130 13 if (ch=='!' || ch=='/' || ch=='?' || isalnum(ch)){
119 11 if (ch=='!' || ch=='/' || ch=='?' || isalnum(ch)){
119 0 if (ch=='!' || ch=='/' || ch=='?' || isalnum(ch)){
98 21 if (ch=='!' || ch=='/' || ch=='?' || isalnum(ch)){
82 0 3 if (!SvPOKp(filename)){
87 3 0 str=SvPV(filename,i);
97 0 3 if (RETVAL->fd == NULL){
115 0 2 if (fh == NULL){
121 0 2 if (c==EOF){
122 0 0 if (PerlIO_error(fh)){
127 0 2 if (PerlIO_ungetc(fh,c)==EOF){
169 0 9 if (! self->fileline){
179 113 6 while(state != 3 && (chn=PerlIO_getc(self->fd))!=EOF ){
110 3 while(state != 3 && (chn=PerlIO_getc(self->fd))!=EOF ){
181 8 102 if (ch==0){ /* read one more character ahead so we have always 2 */
187 0 102 if (bufpos > TAGREADER_MAX_TAGLEN){
188 0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
196 5 97 if (ch=='\n') {
200 97 5 if (ch=='\n'|| ch=='\r' || ch=='\t' || ch==' ') {
97 0 if (ch=='\n'|| ch=='\r' || ch=='\t' || ch==' ') {
96 1 if (ch=='\n'|| ch=='\r' || ch=='\t' || ch==' ') {
9 87 if (ch=='\n'|| ch=='\r' || ch=='\t' || ch==' ') {
202 14 1 if (chn=='\n'|| chn=='\r' || chn=='\t' || chn==' '){
14 0 if (chn=='\n'|| chn=='\r' || chn=='\t' || chn==' '){
13 1 if (chn=='\n'|| chn=='\r' || chn=='\t' || chn==' '){
1 12 if (chn=='\n'|| chn=='\r' || chn=='\t' || chn==' '){
212 9 23 if (ch=='<') {
213 8 1 if (is_start_of_tag(chn)) {
222 1 0 if (SvTRUE(showerrors)){
0 1 if (SvTRUE(showerrors)){
0 1 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 1 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
1 0 if (SvTRUE(showerrors)){
1 0 if (SvTRUE(showerrors)){
1 0 if (SvTRUE(showerrors)){
0 1 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 1 if (SvTRUE(showerrors)){
231 1 51 if (ch=='!' && chn=='-' && self->buffer[bufpos-2]=='<'){
1 0 if (ch=='!' && chn=='-' && self->buffer[bufpos-2]=='<'){
1 0 if (ch=='!' && chn=='-' && self->buffer[bufpos-2]=='<'){
235 6 46 if (ch=='>'){
240 0 52 if(ch=='<'){
242 0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
255 8 6 if(ch=='-' && chn=='>'){
1 7 if(ch=='-' && chn=='>'){
278 6 3 if (chn!=EOF && PerlIO_ungetc(self->fd,chn)==EOF){
0 6 if (chn!=EOF && PerlIO_ungetc(self->fd,chn)==EOF){
283 3 6 if (chn==EOF && state==1 && ch=='>'){
1 2 if (chn==EOF && state==1 && ch=='>'){
1 0 if (chn==EOF && state==1 && ch=='>'){
289 7 2 if (state == 3){
291 7 0 if(GIMME == G_ARRAY){
6 1 if(GIMME == G_ARRAY){
292 0 6 EXTEND(SP,3);
298 0 1 EXTEND(SP,1);
322 0 36 if (! self->fileline){
335 286 30 while(state != 3 && (chn=PerlIO_getc(self->fd))!=EOF ){
280 6 while(state != 3 && (chn=PerlIO_getc(self->fd))!=EOF ){
337 33 247 if (ch==0){ /* read one more character ahead so we have always 2 */
341 10 237 if (ch=='\n') {
351 19 12 if (ch=='<'){
352 19 0 if ( is_start_of_tag(chn)) {
356 0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
367 100 62 if (typeposdone==0 && typepos < TAGREADER_TAGTYPELEN -1 ){
100 0 if (typeposdone==0 && typepos < TAGREADER_TAGTYPELEN -1 ){
368 83 17 if (is_start_of_tag(ch)){
377 0 162 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
0 0 if (ch=='<' && SvTRUE(showerrors)) {
380 162 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 162 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 162 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
8 154 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
8 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
8 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
8 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
8 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
154 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
154 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
81 73 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 81 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 0 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
81 81 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
0 81 if (SvTRUE(showerrors) && bufpos > TAGREADER_MAX_TAGLEN){
384 17 145 if (ch=='>') {
388 4 158 if (ch=='!' && chn=='-' && bufpos > 1 && self->buffer[bufpos-2]=='<'){
1 3 if (ch=='!' && chn=='-' && bufpos > 1 && self->buffer[bufpos-2]=='<'){
1 0 if (ch=='!' && chn=='-' && bufpos > 1 && self->buffer[bufpos-2]=='<'){
1 0 if (ch=='!' && chn=='-' && bufpos > 1 && self->buffer[bufpos-2]=='<'){
400 0 38 if (ch=='>') {
401 0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
405 15 23 if (ch=='<'){
406 12 3 if ( is_start_of_tag(chn)) { /* first char */
410 0 12 if (PerlIO_ungetc(self->fd,chn)==EOF){
419 3 0 if (SvTRUE(showerrors)){
0 3 if (SvTRUE(showerrors)){
0 3 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 3 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
3 0 if (SvTRUE(showerrors)){
3 0 if (SvTRUE(showerrors)){
3 0 if (SvTRUE(showerrors)){
0 3 if (SvTRUE(showerrors)){
0 0 if (SvTRUE(showerrors)){
0 3 if (SvTRUE(showerrors)){
429 9 6 if(ch=='-' && chn=='>'){
1 8 if(ch=='-' && chn=='>'){
447 0 247 if (bufpos > self->currbuflen - 3){
453 6 30 if (chn==EOF){
455 3 3 if (ch) {
461 0 30 if (PerlIO_ungetc(self->fd,chn)==EOF){
470 33 3 if (bufpos>0){
472 33 0 if(GIMME == G_ARRAY){
32 1 if(GIMME == G_ARRAY){
473 0 32 EXTEND(SP,4);
480 0 1 EXTEND(SP,1);