]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.base/define.exp
Allow . character as part of command names.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / define.exp
index d7d4fd03ba528d1f93e05a677387c927280148cc..b5183eceecc3a800b7f52292170043acf8b0f026 100644 (file)
@@ -130,6 +130,31 @@ gdb_test "help nextwhere" \
     "   A next command that first shows you where you're stepping from.*" \
     "preserve whitespace in help string"
 
+# Verify that GDB allows a user to use . in a command name.
+#
+gdb_test_multiple "define dot.command" "define user command: dot.command" {
+    -re "Type commands for definition of \"dot.command\".\r\nEnd with a line saying just \"end\".\r\n>$" {
+       gdb_test "echo dot command\\n\nend" "" \
+           "define user command: dot.command"
+    }
+}
+
+# Verify that dot.command works.
+#
+gdb_test "dot.command" \
+    "dot command" \
+    "full name dot.command"
+gdb_test "dot" \
+    "dot command" \
+    "partial name dot"
+gdb_test "dot." \
+    "dot command" \
+    "partial name dot."
+gdb_test "dot.c" \
+    "dot command" \
+    "partial name dot.c"
+
+
 # Verify that the command parser doesn't require a space after an 'if'
 # command in a user defined function.
 #