X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F171-config-migrate.t;h=136333278504972a3924b101960d3bcd42094eee;hb=7ad32fd2d1611056bd6b24b1f57791939c0f6772;hp=dd0cbc6092dbac026cfb18f70c2e7df2cce5305a;hpb=65e5bcfdf4c44845dadf057a6bde1f15db3381ff;p=i3%2Fi3 diff --git a/testcases/t/171-config-migrate.t b/testcases/t/171-config-migrate.t index dd0cbc60..13633327 100644 --- a/testcases/t/171-config-migrate.t +++ b/testcases/t/171-config-migrate.t @@ -1,6 +1,19 @@ #!perl # vim:ts=4:sw=4:expandtab # +# Please read the following documents before working on tests: +# • https://build.i3wm.org/docs/testsuite.html +# (or docs/testsuite) +# +# • https://build.i3wm.org/docs/lib-i3test.html +# (alternatively: perldoc ./testcases/lib/i3test.pm) +# +# • https://build.i3wm.org/docs/ipc.html +# (or docs/ipc) +# +# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf +# (unless you are already familiar with Perl) +# # Tests if i3-migrate-config-to-v4 correctly migrates all config file # directives and commands # @@ -9,13 +22,6 @@ use Cwd qw(abs_path); use File::Temp qw(tempfile tempdir); use v5.10; -# reads in a whole file -sub slurp { - open my $fh, '<', shift; - local $/; - <$fh>; -} - sub migrate_config { my ($config) = @_; @@ -23,7 +29,7 @@ sub migrate_config { print $fh $config; close($fh); - my $cmd = "sh -c 'exec " . abs_path("../i3-migrate-config-to-v4") . " --v3 <$tmpfile'"; + my $cmd = "sh -c 'exec i3-migrate-config-to-v4 --v3 <$tmpfile'"; return [ split /\n/, qx($cmd) ]; } @@ -134,8 +140,6 @@ $input = <