### ----------------------------------------------------
### -- ASCII::To::Uni
### -- Licenses: Artistic-2.0
### -- Authors: 
### -- File: t/01-sanity.rakutest
### ----------------------------------------------------
use Test;

use ASCII::To::Uni;

plan 1;

my Str $filename = 't/test-file1.raku';
my Str $new-name = 't/test-file1.uni.raku';
my Str $valid-output;

LEAVE unlink $new-name;

# Valid output.
my $proc-v = Proc::Async.new('raku', $filename);

$proc-v.stdout.tap(-> $v { $valid-output = $v; });
$proc-v.stderr.tap(-> $v { fail $v });

await $proc-v.start;

convert-file($filename);

# # # Converted output.
my Str $converted;

my $proc-c = Proc::Async.new('raku', $new-name);

$proc-c.stdout.tap(-> $v { $converted = $v; });
$proc-c.stderr.tap(-> $v { fail $v });

await $proc-c.start;

say $valid-output;
say $converted;

ok $valid-output eq $converted;

# vim: expandtab shiftwidth=4


