dimanche 31 janvier 2016

Failing a test case

I have a test case as following:

# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF']);
Usage: ydi <option(s)> mini-elf-file
 Options are:
  -h --help      Display usage
  -H --header    Show the Mini-ELF header
EOF
pass;

And am trying to get my output to pass this case and match the above. Here is my printf statements:

    printf("Usage: ydi <option(s)> mini-elf-file\n");
    printf(" Options are:\n");
    printf("  -h --help      Display usage\n");
    printf("  -H --header    Show the Mini-ELF header\n");

Which gives me output as the following:

Usage: ydi <option(s)> mini-elf-file
 Options are:
  -h --help      Display usage
  -H --header    Show the Mini-ELF header

But I keep failing the test cases, is anyone able to see where I'm not matching the test case?

Aucun commentaire:

Enregistrer un commentaire