Batch-Interpreter

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

   "name" : "Batch-Interpreter",
   "no_index" : {
      "directory" : [
         "t",
         "inc"
      ]
   },
   "prereqs" : {
      "build" : {
         "requires" : {
            "Test::Differences" : "0",
            "Test::More" : "0"
         }
      },
      "configure" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"
         }
      },
      "runtime" : {
         "requires" : {

META.yml  view on Meta::CPAN

---
abstract: 'interpreter for CMD.EXE batch files'
author:
  - 'Ralf Neubauer <ralf@strcmp.de>'
build_requires:
  Test::Differences: '0'
  Test::More: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640'
license: artistic_2
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Batch-Interpreter

Makefile.PL  view on Meta::CPAN

    VERSION_FROM     => 'lib/Batch/Interpreter.pm',
    ABSTRACT_FROM    => 'lib/Batch/Interpreter.pm',
    LICENSE          => 'artistic_2',
    PL_FILES         => {},
    MIN_PERL_VERSION => 5.010,
    CONFIGURE_REQUIRES => {
        'ExtUtils::MakeMaker' => 0,
    },
    BUILD_REQUIRES => {
        'Test::More' => 0,
	'Test::Differences' => 0,
    },
    PREREQ_PM => {
	'Term::ReadLine' => 0,
	'Getopt::Long' => 0,
	'Data::Dump' => 0,
	'Cwd' => 0,
	'Time::HiRes' => 0,
	'List::MoreUtils' => 0,
	'File::DosGlob' => 0,
	'File::Spec' => 0,

lib/Batch/Interpreter/TestSupport.pm  view on Meta::CPAN

use parent 'Exporter';
our @EXPORT_OK = qw(
	get_test_attr compare_output
	read_file
);

our $VERSION = 0.01;

use Getopt::Long;
use Test::More;
use Test::Differences;
use Data::Dump qw(dump);
use File::Spec;
use File::Temp;
use Cwd;

=head2 ->get_test_attr()

Read C<@ARGV> to generate a C<$test_attr> HashRef, that is returned for (possibly modified) use in ->compare_output().

=cut

t/02-newlines.t  view on Meta::CPAN

#! /usr/bin/perl

use v5.10;
use warnings;
use strict;

use Test::More tests => 9;
use Test::Differences;

use Batch::Interpreter::TestSupport qw(read_file);

eq_or_diff read_file('t/lf.txt'), "a\nb\n", 'lf';
eq_or_diff read_file('t/cr.txt'), "a\rb\r", 'cr';
eq_or_diff read_file('t/crlf.txt'), "a\r\nb\r\n", 'crlf';

isnt read_file('t/lf.txt'), "a\rb\r", 'lf ne cr';
isnt read_file('t/lf.txt'), "a\r\nb\r\n", 'lf ne crlf';
isnt read_file('t/cr.txt'), "a\nb\n", 'cr ne lf';



( run in 2.293 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )