================
@@ -161,6 +161,17 @@ def cleanup():
         )
         self.expect("my_command", substrs=["a.out"])
 
+        # Test that without --overwrite we are not allowed to redefine the 
command.
+        self.expect(
+            "command script add my_command --class welcome.TargetnameCommand",
+            substrs=[
+                "cannot add command: user command exists and force replace not 
set",
+                "--overwrite",
+                "settings set interpreter.require-overwrite false",
----------------
DavidSpickett wrote:

You could just check for the start of it if you're trying to save being verbose 
here. There's only one place the error message is generated, so if we have the 
start we have the end.

Or just check for the whole thing, it's not much more effort. If you want to be 
sure anyone updating the message later knows that this test exists and maybe 
needs updating.

https://github.com/llvm/llvm-project/pull/76030
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to