Guest User

Untitled

a guest
Apr 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. use Test::More;
  2.  
  3. use lib 'lib';
  4. use Simpl;
  5.  
  6.  
  7. my $simpl = Simpl->new({
  8. general => {
  9. verbose => 1,
  10. },
  11. template => {
  12. INCLUDE_PATH => 'share/simpl/skels',
  13. ANYCASE => 1,
  14. EVAL_PERL => 1,
  15.  
  16. },
  17. });
  18.  
  19. ok( $simpl, "does \$simpl exist?" );
  20.  
  21. TODO: {
  22. local $TODO = "create_file() is unfinished.";
  23. $simpl->create_file( {
  24. name => 'tmp/created_file',
  25. filetype => 'txt',
  26. theme => undef,
  27. } );
  28.  
  29. ok( ( -e 'tmp/created_file.txt' ), "create_file created the file?" );
  30.  
  31. {
  32. local $/ = undef;
  33. my $filecontents = <'tmp/created_file.txt'>;
  34.  
  35. like( $filecontents, qr/Author: Jen/, "create_file created the appropriate file?");
  36. }
  37.  
  38. }
  39.  
  40. done_testing();
Add Comment
Please, Sign In to add comment