I am trying to write my first test case in perl with the help of Test::Simple module.
I have saved the file with .t extension now when i am trying to run this file on windows system then it says windows can not open this file.
I had googled about this and what i found is for running this file you should make a new directory with name /t and keep this file to there.
http://perlmeme.org/tutorials/writing_test_harness.html
I have tried this also but still it is not working.
Can any body gives me some tips.
following is my Test cases :
#!/usr/bin/perl -w
use Test::Simple tests => 2;
ok( 1 + 1 == 2 );
ok( 2 + 2 == 5 );
A .t file in Perl is just a Perl script. The .t is just there to let you know that it’s a test script instead of something else. The file extension and directory structure really doesn’t matter, it’s there just to help you can keep your environment clean.
To run a Perl script on Windows, from a command line, simply type
perl <script name>. Make sure that you have a Perl executable installed on your system as Windows does not come with one by default, and make sure it is in your path. If the script you want to run is not in your current directory, make sure to specify the path to the script.