]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/options.exp
Make "backtrace" support -OPT options
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / options.exp
CommitLineData
9d0faba9
PA
1# This testcase is part of GDB, the GNU debugger.
2
3# Copyright 2019 Free Software Foundation, Inc.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18# Test the gdb::option framework.
19
20# The test uses the "maintenance test-options" subcommands to exercise
21# TAB-completion and option processing.
7d8062de 22#
d4c16835
PA
23# It also tests option integration in various commands, including:
24#
25# - print
26# - compile print
27# - backtrace
9d0faba9
PA
28
29load_lib completion-support.exp
30
7d8062de
PA
31standard_testfile .c
32
33if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
34 return -1
35}
36
9d0faba9
PA
37clean_restart
38
39if { ![readline_is_used] } {
40 untested "no tab completion support without readline"
41 return -1
42}
43
44# Check the completion result, as returned by the "maintenance show
45# test-options-completion-result" command. TEST is used as test name.
46proc check_completion_result {expected test} {
47 gdb_test "maintenance show test-options-completion-result" \
48 "$expected" \
49 "$test: res=$expected"
50}
51
52# Like test_gdb_complete_unique, but the expected output is expected
53# to be the input line. I.e., the line is already complete. We're
54# just checking whether GDB recognizes the option and auto-appends a
55# space.
56proc test_completer_recognizes {res input_line} {
57 set expected_re [string_to_regexp $input_line]
58 test_gdb_complete_unique $input_line $expected_re
59 check_completion_result $res $input_line
60}
61
62# Wrapper around test_gdb_complete_multiple that also checks the
63# completion result is RES.
64proc res_test_gdb_complete_multiple {res cmd_prefix completion_word args} {
65 test_gdb_complete_multiple $cmd_prefix $completion_word {*}$args
66 check_completion_result $res "$cmd_prefix$completion_word"
67}
68
69# Wrapper around test_gdb_complete_none that also checks the
70# completion result is RES.
71proc res_test_gdb_complete_none { res input_line } {
72 test_gdb_complete_none $input_line
73 check_completion_result $res "$input_line"
74}
75
76# Wrapper around test_gdb_complete_unique that also checks the
77# completion result is RES.
78proc res_test_gdb_complete_unique { res input_line args} {
79 test_gdb_complete_unique $input_line {*}$args
80 check_completion_result $res "$input_line"
81}
82
83# Make a full command name from VARIANT. VARIANT is either
84# "require-delimiter", "unknown-is-error" or "unknown-is-operand".
85proc make_cmd {variant} {
86 return "maint test-options $variant"
87}
88
89# Return a string for the expected result of running "maint
90# test-options xxx", with no flag/option set. OPERAND is the expected
91# operand.
92proc expect_none {operand} {
93 return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -- $operand"
94}
95
96# Return a string for the expected result of running "maint
97# test-options xxx", with -flag set. OPERAND is the expected operand.
98proc expect_flag {operand} {
99 return "-flag 1 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -- $operand"
100}
101
102# Return a string for the expected result of running "maint
103# test-options xxx", with -bool set. OPERAND is the expected operand.
104proc expect_bool {operand} {
105 return "-flag 0 -xx1 0 -xx2 0 -bool 1 -enum xxx -uint 0 -zuint-unl 0 -- $operand"
106}
107
108# Return a string for the expected result of running "maint
109# test-options xxx", with one of the integer options set to $VAL.
110# OPTION determines which option to expect set. OPERAND is the
111# expected operand.
112proc expect_integer {option val operand} {
113 if {$option == "uinteger"} {
114 return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint $val -zuint-unl 0 -- $operand"
115 } elseif {$option == "zuinteger-unlimited"} {
116 return "-flag 0 -xx1 0 -xx2 0 -bool 0 -enum xxx -uint 0 -zuint-unl $val -- $operand"
117 } else {
118 error "unsupported option: $option"
119 }
120}
121
122set all_options {
123 "-bool"
124 "-enum"
125 "-flag"
126 "-uinteger"
127 "-xx1"
128 "-xx2"
129 "-zuinteger-unlimited"
130}
131
7d8062de
PA
132# Basic option-machinery + "print" command integration tests.
133proc_with_prefix test-print {{prefix ""}} {
134 clean_restart
135
136 # Completing "print" with no argument completes on symbols only,
137 # no options are offered. Since we haven't loaded any symbols,
138 # the match list should be empty.
139 test_gdb_complete_none "${prefix}print "
140
141 # OTOH, completing at "-" should list all options.
142 test_gdb_complete_multiple "${prefix}print " "-" "" {
143 "-address"
144 "-array"
145 "-array-indexes"
146 "-elements"
147 "-max-depth"
148 "-null-stop"
149 "-object"
150 "-pretty"
151 "-repeats"
152 "-static-members"
153 "-symbol"
154 "-union"
155 "-vtbl"
156 }
157
158 global binfile
159 clean_restart $binfile
160
161 if ![runto_main] {
162 fail "cannot run to main"
163 return
164 }
165
166 # Mix options and format.
167 gdb_test "${prefix}print -pretty -- /x 1" " = 0x1"
168
169 # Smoke test that options actually work.
170 gdb_test "${prefix}print -pretty -- g_s" \
171 [multi_line \
172 " = {" \
173 " a = 1," \
174 " b = 2," \
175 " c = 3" \
176 "}"]
177
178 test_gdb_complete_unique \
179 "${prefix}print xxx" \
180 "${prefix}print xxx1"
181 test_gdb_complete_unique \
182 "${prefix}print -- xxx" \
183 "${prefix}print -- xxx1"
184
185 # Error messages when testing with "compile" are different from
186 # the error messages gdb's internal parser throws. This procedure
187 # hides the difference. EXPECTED_RE is only considered when not
188 # testing with "compile".
189 proc test_invalid_expression {cmd expected_re} {
190 upvar prefix prefix
191
192 if {$prefix != "compile "} {
193 gdb_test $cmd $expected_re
194 } else {
195 # Error messages depend on compiler version, so we just
196 # look for the last line indicating a failure.
197 gdb_test $cmd "Compilation failed\\."
198 }
199 }
200
201 # Check that '-XXX' without a "--" is handled as an
202 # expression.
203 gdb_test "${prefix}print -1" " = -1"
204 test_invalid_expression \
205 "${prefix}print --1" \
206 "Left operand of assignment is not an lvalue\\."
207 test_invalid_expression \
208 "${prefix}print -object" \
209 "No symbol \"object\".*"
210
211 # Test printing with options and no expression.
212 set test "${prefix}print -object --"
213 if {$prefix != "compile "} {
214 # Regular "print" repeats the last history value.
215 gdb_test $test " = -1"
216 } else {
217 # "compile print" starts a multiline expression.
218 gdb_test_multiple $test $test {
219 -re ">$" {
220 gdb_test "-1\nend" " = -1" \
221 $test
222 }
223 }
224 }
225
226 # Check that everything after "-- " is treated as an
227 # expression, not confused with an option.
228 test_invalid_expression \
229 "${prefix}print -- -address" \
230 "No symbol.*"
231 gdb_test "${prefix}print -- -1" " = -1"
232 test_invalid_expression \
233 "${prefix}print -- --1" \
234 "Left operand of assignment is not an lvalue\\."
235}
236
d4c16835
PA
237# Basic option-machinery + "backtrace" command integration tests.
238proc_with_prefix test-backtrace {} {
239 clean_restart
240
241 test_gdb_complete_unique "backtrace" "backtrace"
242 test_gdb_complete_none "backtrace "
243
244 gdb_test "backtrace -" "Ambiguous option at: -"
245 gdb_test "backtrace --" "No stack\\."
246 gdb_test "backtrace -- -" "No stack\\."
247
248 test_gdb_complete_multiple "backtrace " "-" "" {
249 "-entry-values"
250 "-frame-arguments"
251 "-full"
252 "-hide"
253 "-no-filters"
254 "-past-entry"
255 "-past-main"
256 "-raw-frame-arguments"
257 }
258
259 global binfile
260 clean_restart $binfile
261
262 if ![runto_main] {
263 fail "cannot run to main"
264 return
265 }
266
267 # COUNT in "backtrace COUNT" is parsed as an expression. Check
268 # that we complete expressions.
269
270 test_gdb_complete_unique \
271 "backtrace xxx" \
272 "backtrace xxx1"
273
274 test_gdb_complete_unique \
275 "backtrace -xxx" \
276 "backtrace -xxx1"
277
278 test_gdb_complete_unique \
279 "backtrace 1 + xxx" \
280 "backtrace 1 + xxx1"
281
282 test_gdb_complete_unique \
283 "backtrace (1 + xxx" \
284 "backtrace (1 + xxx1"
285}
286
9d0faba9
PA
287# Miscellaneous tests.
288proc_with_prefix test-misc {variant} {
289 global all_options
290
291 set cmd [make_cmd $variant]
292
293 # Call test command with no arguments at all.
294 gdb_test "$cmd" [expect_none ""]
295
296 # Now with a single dash.
297 if {$variant == "require-delimiter"} {
298 gdb_test "$cmd -" [expect_none "-"]
299 } else {
300 gdb_test "$cmd -" "Ambiguous option at: -"
301 }
302
303 # Completing at "-" should list all options.
304 res_test_gdb_complete_multiple "1" "$cmd " "-" "" $all_options
305
306 # Now with a double dash.
307 gdb_test "$cmd --" [expect_none ""]
308
309 # "--" is recognized by options completer, gdb auto-appends a
310 # space.
311 test_completer_recognizes 1 "$cmd --"
312
313 # Now with a double dash, plus a dash as operand.
314 gdb_test "$cmd -- -" [expect_none "-"]
315 res_test_gdb_complete_none "0 -" "$cmd -- -"
316
317 # Completing an unambiguous option just appends an empty space.
318 test_completer_recognizes 1 "$cmd -flag"
319
320 # Try running an ambiguous option.
321 if {$variant == "require-delimiter"} {
322 gdb_test "$cmd -xx" [expect_none "-xx"]
323 } else {
324 gdb_test "$cmd -xx" "Ambiguous option at: -xx"
325 }
326
327 # Check that options are not case insensitive.
328 gdb_test "$cmd -flag --" [expect_flag ""]
329
330 # Check how the different modes behave on unknown option, with a
331 # delimiter.
332 gdb_test "$cmd -FLAG --" \
333 "Unrecognized option at: -FLAG --"
334
335 # Check how the different modes behave on unknown option, without
336 # a delimiter.
337 if {$variant == "unknown-is-error"} {
338 gdb_test "$cmd -FLAG" \
339 "Unrecognized option at: -FLAG"
340 } else {
341 gdb_test "$cmd -FLAG" [expect_none "-FLAG"]
342 }
343
344 # Test parsing stops at a negative integer.
345 gdb_test "$cmd -1 --" \
346 "Unrecognized option at: -1 --"
347 gdb_test "$cmd -2 --" \
348 "Unrecognized option at: -2 --"
349}
350
351# Flag option tests.
352proc_with_prefix test-flag {variant} {
353 global all_options
354
355 set cmd [make_cmd $variant]
356
357 # Completing a flag just appends a space.
358 test_completer_recognizes 1 "$cmd -flag"
359
360 # Add a dash, and all options should be shown.
361 test_gdb_complete_multiple "$cmd -flag " "-" "" $all_options
362
363 # Basic smoke tests of accepted / not accepted values.
364
365 # Check all the different variants a bool option may be specified.
366 if {$variant == "require-delimiter"} {
367 gdb_test "$cmd -flag 999" [expect_none "-flag 999"]
368 } else {
369 gdb_test "$cmd -flag 999" [expect_flag "999"]
370 }
371 gdb_test "$cmd -flag -- 999" [expect_flag "999"]
372
373 # If the "--" separator is present, then GDB errors out if the
374 # flag option is passed some value -- check that too.
375 gdb_test "$cmd -flag xxx 999 --" "Unrecognized option at: xxx 999 --"
376 gdb_test "$cmd -flag o 999 --" "Unrecognized option at: o 999 --"
377 gdb_test "$cmd -flag 1 999 --" "Unrecognized option at: 1 999 --"
378
379 # Extract twice the same flag, separated by one space.
380 gdb_test "$cmd -flag -flag -- non flags args" \
381 [expect_flag "non flags args"]
382
383 # Extract twice the same flag, separated by one space.
384 gdb_test "$cmd -xx1 -xx2 -xx1 -xx2 -xx1 -- non flags args" \
385 "-flag 0 -xx1 1 -xx2 1 -bool 0 -enum xxx -uint 0 -zuint-unl 0 -- non flags args"
386
387 # Extract 2 known flags in front of unknown flags.
388 gdb_test "$cmd -xx1 -xx2 -a -b -c -xx1 --" \
389 "Unrecognized option at: -a -b -c -xx1 --"
390
391 # Check that combined flags are not recognised.
392 gdb_test "$cmd -xx1 -xx1xx2 -xx1 --" \
393 "Unrecognized option at: -xx1xx2 -xx1 --"
394
395 # Make sure the completer don't confuse a flag option with a
396 # boolean option. Specifically, "o" should not complete to
397 # "on/off".
398
399 if {$variant == "require-delimiter"} {
400 res_test_gdb_complete_none "1" "$cmd -flag o"
401
402 gdb_test "$cmd -flag o" [expect_none "-flag o"]
403 } else {
404 res_test_gdb_complete_none "0 o" "$cmd -flag o"
405
406 gdb_test "$cmd -flag o" [expect_flag "o"]
407 }
408}
409
410# Boolean option tests.
411proc_with_prefix test-boolean {variant} {
412 global all_options
413
414 set cmd [make_cmd $variant]
415
416 # Boolean option's values are optional -- "on" is implied. Check
417 # that:
418 #
419 # - For require-delimiter commands, completing after a boolean
420 # option lists all other options, plus "on/off". This is
421 # because operands won't be processed until we see a "--"
422 # delimiter.
423 #
424 # - For !require-delimiter commands, completing after a boolean
425 # option completes as an operand, since that will tend to be
426 # more common than typing "on/off".
427 # E.g., "frame apply all -past-main COMMAND".
428
429 if {$variant == "require-delimiter"} {
430 res_test_gdb_complete_multiple 1 "$cmd -bool " "" "" {
431 "-bool"
432 "-enum"
433 "-flag"
434 "-uinteger"
435 "-xx1"
436 "-xx2"
437 "-zuinteger-unlimited"
438 "off"
439 "on"
440 }
441 } else {
442 res_test_gdb_complete_none "0 " "$cmd -bool "
443 }
444
445 # Add another dash, and "on/off" are no longer offered:
446 res_test_gdb_complete_multiple 1 "$cmd -bool " "-" "" $all_options
447
448 # Basic smoke tests of accepted / not accepted values.
449
450 # The command accepts all of "1/0/enable/disable/yes/no" too, even
451 # though like the "set" command, we don't offer those as
452 # completion candidates if you complete right after the boolean
453 # command's name, like:
454 #
455 # (gdb) maint test-options require-delimiter -bool [TAB]
456 # off on
457 #
458 # However, the completer does recognize them if you start typing
459 # the boolean value.
460 foreach value {"0" "1"} {
461 test_completer_recognizes 1 "$cmd -bool $value"
462 }
463 foreach value {"of" "off"} {
464 res_test_gdb_complete_unique 1 \
465 "$cmd -bool $value" \
466 "$cmd -bool off"
467 }
468 foreach value {"y" "ye" "yes"} {
469 res_test_gdb_complete_unique 1 \
470 "$cmd -bool $value" \
471 "$cmd -bool yes"
472 }
473 foreach value {"n" "no"} {
474 res_test_gdb_complete_unique 1 \
475 "$cmd -bool $value" \
476 "$cmd -bool no"
477 }
478 foreach value {
479 "e"
480 "en"
481 "ena"
482 "enab"
483 "enabl"
484 "enable"
485 } {
486 res_test_gdb_complete_unique 1 \
487 "$cmd -bool $value" \
488 "$cmd -bool enable"
489 }
490 foreach value {
491 "d"
492 "di"
493 "dis"
494 "disa"
495 "disab"
496 "disabl"
497 "disable"
498 } {
499 res_test_gdb_complete_unique 1 \
500 "$cmd -bool $value" \
501 "$cmd -bool disable"
502 }
503
504 if {$variant == "require-delimiter"} {
505 res_test_gdb_complete_none "1" "$cmd -bool xxx"
506 } else {
507 res_test_gdb_complete_none "0 xxx" "$cmd -bool xxx"
508 }
509
510 # The command accepts abbreviations of "enable/disable/yes/no",
511 # even though we don't offer those for completion.
512 foreach value {
513 "1"
514 "y" "ye" "yes"
515 "e"
516 "en"
517 "ena"
518 "enab"
519 "enabl"
520 "enable"} {
521 gdb_test "$cmd -bool $value --" [expect_bool ""]
522 }
523 foreach value {
524 "0"
525 "of" "off"
526 "n" "no"
527 "d"
528 "di"
529 "dis"
530 "disa"
531 "disab"
532 "disabl"
533 "disable"} {
534 gdb_test "$cmd -bool $value --" [expect_none ""]
535 }
536
537 if {$variant == "require-delimiter"} {
538 gdb_test "$cmd -bool 999" [expect_none "-bool 999"]
539 } else {
540 gdb_test "$cmd -bool 999" [expect_bool "999"]
541 }
542 gdb_test "$cmd -bool -- 999" [expect_bool "999"]
543
544 # Since "on" is implied after a boolean option, for
545 # !require-delimiter commands, anything that is not
546 # yes/no/1/0/on/off/enable/disable should be considered as the raw
547 # input after the last option. Also check "o", which might look
548 # like "on" or "off", but it's treated the same.
549
550 foreach arg {"xxx" "o"} {
551 if {$variant == "require-delimiter"} {
552 gdb_test "$cmd -bool $arg" [expect_none "-bool $arg"]
553 } else {
554 gdb_test "$cmd -bool $arg" [expect_bool "$arg"]
555 }
556 }
557 # Also try -1. "unknown-is-error" commands error out saying that
558 # that's not a valid option.
559 if {$variant == "require-delimiter"} {
560 gdb_test "$cmd -bool -1" \
561 [expect_none "-bool -1"]
562 } elseif {$variant == "unknown-is-error"} {
563 gdb_test "$cmd -bool -1" \
564 "Unrecognized option at: -1"
565 } else {
566 gdb_test "$cmd -bool -1" [expect_bool "-1"]
567 }
568
569 # OTOH, if the "--" separator is present, then GDB errors out if
570 # the boolean option is passed an invalid value -- check that too.
571 gdb_test "$cmd -bool -1 999 --" \
572 "Unrecognized option at: -1 999 --"
573 gdb_test "$cmd -bool xxx 999 --" \
574 "Value given for `-bool' is not a boolean: xxx"
575 gdb_test "$cmd -bool o 999 --" \
576 "Value given for `-bool' is not a boolean: o"
577
578 # Completing after a boolean option + "o" does list "on/off",
579 # though.
580 if {$variant == "require-delimiter"} {
581 res_test_gdb_complete_multiple 1 "$cmd -bool " "o" "" {
582 "off"
583 "on"
584 }
585 } else {
586 res_test_gdb_complete_multiple "0 o" "$cmd -bool " "o" "" {
587 "off"
588 "on"
589 }
590 }
591}
592
593# Uinteger option tests. OPTION is which integer option we're
594# testing. Can be "uinteger" or "zuinteger-unlimited".
595proc_with_prefix test-uinteger {variant option} {
596 global all_options
597
598 set cmd "[make_cmd $variant] -$option"
599
600 # Test completing a uinteger option:
601 res_test_gdb_complete_multiple 1 "$cmd " "" "" {
602 "NUMBER"
603 "unlimited"
604 }
605
606 # NUMBER above is just a placeholder, make sure we don't complete
607 # it as a valid option.
608 res_test_gdb_complete_none 1 "$cmd NU"
609
610 # "unlimited" is valid though.
611 res_test_gdb_complete_unique 1 \
612 "$cmd u" \
613 "$cmd unlimited"
614
615 # Basic smoke test of accepted / not accepted values.
616 gdb_test "$cmd 1 -- 999" [expect_integer $option "1" "999"]
617 gdb_test "$cmd unlimited -- 999" \
618 [expect_integer $option "unlimited" "999"]
619 if {$option == "zuinteger-unlimited"} {
620 gdb_test "$cmd -1 --" [expect_integer $option "unlimited" ""]
621 gdb_test "$cmd 0 --" [expect_integer $option "0" ""]
622 } else {
623 gdb_test "$cmd -1 --" "integer -1 out of range"
624 gdb_test "$cmd 0 --" [expect_integer $option "unlimited" ""]
625 }
626 gdb_test "$cmd xxx --" \
627 "Expected integer at: xxx --"
628 gdb_test "$cmd unlimitedx --" \
629 "Expected integer at: unlimitedx --"
630
631 # Don't offer completions until we're past the
632 # -uinteger/-zuinteger-unlimited argument.
633 res_test_gdb_complete_none 1 "$cmd 1"
634
635 # A number of invalid values.
636 foreach value {"x" "x " "1a" "1a " "1-" "1- " "unlimitedx"} {
637 res_test_gdb_complete_none 1 "$cmd $value"
638 }
639
640 # Try "-1".
641 if {$option == "uinteger"} {
642 # -1 is invalid uinteger.
643 foreach value {"-1" "-1 "} {
644 res_test_gdb_complete_none 1 "$cmd $value"
645 }
646 } else {
647 # -1 is valid for zuinteger-unlimited.
648 res_test_gdb_complete_none 1 "$cmd -1"
649 if {$variant == "require-delimiter"} {
650 res_test_gdb_complete_multiple 1 "$cmd -1 " "" "-" $all_options
651 } else {
652 res_test_gdb_complete_none "0 " "$cmd -1 "
653 }
654 }
655
656 # Check that after a fully parsed option:
657 #
658 # - for require-delimiter commands, completion offers all
659 # options.
660 #
661 # - for !require-delimiter commands, completion offers nothing
662 # and returns false.
663 if {$variant == "require-delimiter"} {
664 res_test_gdb_complete_multiple 1 "$cmd 1 " "" "-" $all_options
665 } else {
666 res_test_gdb_complete_none "0 " "$cmd 1 "
667 }
668
669 # Test completing non-option arguments after "-uinteger 1 ".
670 foreach operand {"x" "x " "1a" "1a " "1-" "1- "} {
671 if {$variant == "require-delimiter"} {
672 res_test_gdb_complete_none 1 "$cmd 1 $operand"
673 } else {
674 res_test_gdb_complete_none "0 $operand" "$cmd 1 $operand"
675 }
676 }
677 # These look like options, but they aren't.
678 foreach operand {"-1" "-1 "} {
679 if {$variant == "unknown-is-operand"} {
680 res_test_gdb_complete_none "0 $operand" "$cmd 1 $operand"
681 } else {
682 res_test_gdb_complete_none 1 "$cmd 1 $operand"
683 }
684 }
685}
686
687# Enum option tests.
688proc_with_prefix test-enum {variant} {
689 set cmd [make_cmd $variant]
690
691 res_test_gdb_complete_multiple 1 "$cmd -enum " "" "" {
692 "xxx"
693 "yyy"
694 "zzz"
695 }
696
697 # Check that "-" where a value is expected does not show the
698 # command's options. I.e., an enum's value is not optional.
699 # Check both completion and running the command.
700 res_test_gdb_complete_none 1 "$cmd -enum -"
701 gdb_test "$cmd -enum --"\
702 "Requires an argument. Valid arguments are xxx, yyy, zzz\\."
703
704 # Try passing an undefined item to an enum option.
705 gdb_test "$cmd -enum www --" "Undefined item: \"www\"."
706}
707
708# Run the options framework tests first.
709foreach_with_prefix cmd {
710 "require-delimiter"
711 "unknown-is-error"
712 "unknown-is-operand"
713} {
714 test-misc $cmd
715 test-flag $cmd
716 test-boolean $cmd
717 foreach subcmd {"uinteger" "zuinteger-unlimited" } {
718 test-uinteger $cmd $subcmd
719 }
720 test-enum $cmd
721}
7d8062de
PA
722
723# Run the print integration tests.
724test-print ""
725
726# Same for "compile print".
727if ![skip_compile_feature_tests] {
728 test-print "compile "
729}
d4c16835
PA
730
731# Basic "backtrace" integration tests.
732test-backtrace