commands += Command.command("noop") { s => s }

TaskKey[Unit]("check") := {
  assert(commands.value.toString().contains("SimpleCommand(noop)"),
    s"""commands should contain "SimpleCommand(noop)" in ${commands.value}""")
}

commands += Command.command("noop") { s => s }

TaskKey[Unit]("check") := {
  assert(commands.value.toString() == "List(SimpleCommand(noop))",
    s"""commands should display "List(SimpleCommand(noop))" but is ${commands.value}""")
}

--- 
+++ 
@@ -1,6 +1,6 @@
 commands += Command.command("noop") { s => s }
 
 TaskKey[Unit]("check") := {
-  assert(commands.value.toString() == "List(SimpleCommand(noop))",
-    s"""commands should display "List(SimpleCommand(noop))" but is ${commands.value}""")
+  assert(commands.value.toString().contains("SimpleCommand(noop)"),
+    s"""commands should contain "SimpleCommand(noop)" in ${commands.value}""")
 }
Fix string-to-command to ignore existing commands

The scripted batch executor injects a command and the operation
performed in this test checks all the commands, assuming only `noop` is
declared.
