anchor.diff:              no-restart-service = simple-service // {
                 restartIfChanged = false;
               };
  +
  +            reload-triggers = simple-service // {
  +              wantedBy = [ "multi-user.target" ];
  +            };
  +
  +            reload-triggers-and-restart-by-as = simple-service;
  +
  +            reload-triggers-and-restart = simple-service // {
  +              stopIfChanged = false; # easier to check for this
  +              wantedBy = [ "multi-user.target" ];
  +            };
             };
   
             system.activationScripts.restart-and-reload-test = {
  
positive.code:               Type = "oneshot";
                RemainAfterExit = true;
                ExecStart = "${pkgs.coreutils}/bin/true";
              };
            };
          };
  
negative.code:         assert_contains(out, "Main PID:")  # output of systemctl
          assert_lacks(out, "as well:")
  
      with subtest("unit file parser"):
          # Switch to a well-known state
          switch_to_specialisation("${machine}", "simpleServiceNostop")
  
          # Add a section
          out = switch_to_specialisation("${machine}", "simpleServiceWithExtraSection")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Rename it
          out = switch_to_specialisation("${machine}", "simpleServiceWithExtraSectionOtherName")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Remove it
          out = switch_to_specialisation("${machine}", "simpleServiceNostop")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # [Install] section is ignored
          out = switch_to_specialisation("${machine}", "simpleServiceWithInstallSection")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_lacks(out, "\nrestarting the following units:")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Add a key
          out = switch_to_specialisation("${machine}", "simpleServiceWithExtraKey")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Change its value
          out = switch_to_specialisation("${machine}", "simpleServiceWithExtraKeyOtherValue")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Rename it
          out = switch_to_specialisation("${machine}", "simpleServiceWithExtraKeyOtherName")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Remove it
          out = switch_to_specialisation("${machine}", "simpleServiceNostop")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Add a reload trigger
          out = switch_to_specialisation("${machine}", "simpleServiceReloadTrigger")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_contains(out, "reloading the following units: test.service\n")
          assert_lacks(out, "\nrestarting the following units:")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Modify the reload trigger
          out = switch_to_specialisation("${machine}", "simpleServiceReloadTriggerModified")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_contains(out, "reloading the following units: test.service\n")
          assert_lacks(out, "\nrestarting the following units:")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Modify the reload trigger and something else
          out = switch_to_specialisation("${machine}", "simpleServiceReloadTriggerModifiedAndSomethingElse")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_contains(out, "\nrestarting the following units: test.service\n")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
          # Remove the reload trigger
          out = switch_to_specialisation("${machine}", "simpleServiceReloadTriggerModifiedSomethingElse")
          assert_lacks(out, "stopping the following units:")
          assert_lacks(out, "NOT restarting the following changed units:")
          assert_lacks(out, "reloading the following units:")
          assert_lacks(out, "\nrestarting the following units:")
          assert_lacks(out, "\nstarting the following units:")
          assert_lacks(out, "the following new units were started:")
          assert_lacks(out, "as well:")
  
      with subtest("restart and reload by activation script"):
          switch_to_specialisation("${machine}", "simpleServiceNorestart")
          out = switch_to_specialisation("${machine}", "restart-and-reload-by-activation-script")
  