mostly fix "not" stuff
[scpubgit/DKit.git] / t / dot_ssh.t
index d55b5d5..6557838 100644 (file)
@@ -82,7 +82,7 @@ $solver->add_rule(@$_) for (
 %path_status = %protos;
 
 sub paths_for_simple {
-  join ' ', map $_->value_for('PS')->path, $solver->query(
+  join ' ', map $_->value_for('PS')->path, $solver->solve(
     [ path_status => 'PS' ], @_
   )->results;
 }
@@ -106,7 +106,7 @@ $solver->add_rule(
 );
 
 throws_ok {
-  $solver->query(
+  $solver->solve(
     [ path_status_at => 'PS', \'.ssh' ]
   )->results
 } qr/ARGH/;
@@ -127,7 +127,7 @@ $solver->add_rule(
 my @res;
 
 lives_ok {
-  @res = $solver->query(
+  @res = $solver->solve(
     [ path_status_at => 'PS', \'.ssh' ]
   )->results
 };
@@ -164,7 +164,7 @@ $solver->add_rule(
 $ob_res{'.ssh'} = $protos{'.ssh'};
 
 sub paths_for {
-  join ' ', map $_->value_for('PS')->path, $solver->query(@_)->results;
+  join ' ', map $_->value_for('PS')->path, $solver->solve(@_)->results;
 }
 
 is(
@@ -194,7 +194,7 @@ lives_ok { paths_for([ path_status_at => 'PS', \'.ssh' ]) }
 $path_status{'.ssh/authorized_keys'} = $protos{'.ssh/authorized_keys'};
 
 is(
-  paths_for([ path_status => 'PS' ], [ not => [ is_directory => 'PS' ] ]),
+  paths_for([ path_status => 'PS' ], [ not => [ [ is_directory => 'PS' ] ] ]),
   '.ssh/authorized_keys',
   'Negation'
 );
@@ -217,7 +217,7 @@ $ob_res{'.ssh'} = $empty{'.ssh'};
 $solver->{observation_policy} = sub { 1 };
 
 sub dot_ssh_query {
-  $solver->query([ directory_at => 'PS' => \'.ssh' ]);
+  $solver->solve([ directory_at => 'PS' => \'.ssh' ]);
 }
 
 is_deeply(
@@ -229,7 +229,7 @@ is_deeply(
 
 $solver->add_rule(@$_) for (
   [ is_directory => [ qw(PS) ],
-    [ not => [ exists_path => 'PS' ] ],
+    [ not => [ [ exists_path => 'PS' ] ] ],
     [ act => [ 'PS' ],
         sub {
           my ($value) = @_;
@@ -288,7 +288,7 @@ $solver->add_rule(@$_) for (
     [ catfile => qw(DirPath FileName FilePath) ],
     [ file_at => qw(FileStatus FilePath) ] ],
   [ is_file => [ qw(PS) ],
-    [ not => [ exists_path => 'PS' ] ],
+    [ not => [ [ exists_path => 'PS' ] ] ],
     [ act => [ 'PS' ],
         sub {
           my ($value) = @_;
@@ -313,7 +313,7 @@ $solver->add_rule(@$_) for (
 %ob_res = %empty;
 
 sub keys_file {
-  $solver->query(
+  $solver->solve(
      [ directory_at => 'D' => \'.ssh' ],
      [ file_in => 'D' => \'authorized_keys' => 'F' ],
    );