case-insensitive-symbols.exp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 2015-2022 Free Software Foundation, Inc.
  2. #
  3. # This program is free software; you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. load_lib "pascal.exp"
  16. standard_testfile .pas
  17. if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug class]] != "" } {
  18. untested "failed to compile"
  19. return -1
  20. }
  21. clean_restart ${testfile}
  22. set bp_location [gdb_get_line_number "set breakpoint here"]
  23. if { ![runto ${srcfile}:${bp_location}] } {
  24. return 0
  25. }
  26. # We are now inside CHECK method.
  27. gdb_test "p X" " = 67"
  28. gdb_test "p B.X" " = 11"
  29. gdb_test "p Y" " = 33"
  30. gdb_test "p B.Y" " = 35"
  31. # As A is global, we can also check its value.
  32. gdb_test "p A.X" " = 67"
  33. gdb_test "p A.Y" " = 33"
  34. # Now test lowercase version.
  35. gdb_test "p x" " = 67"
  36. gdb_test "p y" " = 33"
  37. gdb_test "p B.x" " = 11"
  38. gdb_test "p B.y" " = 35"
  39. # As A is global, we can also check its value, with lowercase.
  40. gdb_test "p A.x" " = 67"
  41. gdb_test "p A.y" " = 33"
  42. # Also test lowercase class names.
  43. gdb_test "p b.X" " = 11"
  44. gdb_test "p b.x" " = 11"
  45. gdb_test "p b.Y" " = 35"
  46. gdb_test "p b.y" " = 35"
  47. gdb_test "p a.X" " = 67"
  48. gdb_test "p a.x" " = 67"
  49. gdb_test "p a.Y" " = 33"
  50. gdb_test "p a.y" " = 33"
  51. gdb_exit