Help for this page

Select Code to Download


  1. or download this
    #   Failed test 'comparePaths(/a/b, /a)'
    #   in Monks/Snippet.pm at line 132.
    ...
    #          got: '-2'
    #     expected: '-1'
    # Looks like you failed 4 tests of 36.
    
  2. or download this
    #   Failed test 'comparePaths(/, /a)'
    #   in Monks/Snippet.pm at line 108.
    ...
    #          got: '-2'
    #     expected: '-1'
    # Looks like you failed 4 tests of 36.
    
  3. or download this
        #replace
        my @aDirs = File::Spec->splitdir($sDirPart);
    ...
        my @aDirs = $sDirPart eq File::Spec->rootdir()
          ? ('') : File::Spec->splitdir($sDirPart);
    
  4. or download this
    use strict;
    use warnings;
    ...
    is(comparePaths('/a/b/', '/a/x'), -2, "comparePaths(/a/b/, /a/x)");
    is(comparePaths('/a/b/', '/a/x/'), -2, "comparePaths(/a/b/, /a/x/)");