mercredi 24 avril 2019

Perl6: Read file in test folder when using prove6

When writing tests, text file gets read in the test folder but not outside the folder (i.e., when running prove6). For example, this code reads ReadConfig.ini inside the test folder, but not outside of it:

my %v = ReadIni( 'ReadConfig.ini' );

On the other hand, this code works outside the test folder:

my %v = ReadIni( $*PROGRAM.dirname.IO.add('ReadConfig.ini') );

What would the proper syntax?

Thanks!

Aucun commentaire:

Enregistrer un commentaire