/test/lib/string/test_verbatim_string2.e

http://github.com/tybor/Liberty · Specman e · 82 lines · 49 code · 12 blank · 21 comment · 0 complexity · 93bb0fc8e589442034e34f47d4980ff8 MD5 · raw file

  1. -- This file is part of SmartEiffel The GNU Eiffel Compiler Tools and Libraries.
  2. -- See the Copyright notice at the end of this file.
  3. --
  4. class TEST_VERBATIM_STRING2
  5. insert
  6. EIFFELTEST_TOOLS
  7. create {}
  8. run
  9. feature {}
  10. run
  11. local
  12. s1: STRING
  13. do
  14. s1 := "bar[
  15. AAAA A
  16. ]bar"
  17. assert(("AAAA A").is_equal(s1))
  18. s1 := "bar{
  19. BB B
  20. }bar"
  21. assert(("%NBB B%N").is_equal(s1))
  22. s1 := "bar{
  23. EE E
  24. }bar"
  25. assert(("%N EE E%N").is_equal(s1))
  26. s1 := "bar[
  27. C%C
  28. ]bar"
  29. assert(("%NC%%C%N").is_equal(s1))
  30. s1 := "bar[
  31. 11
  32. 22
  33. 33%N
  34. ]bar"
  35. assert(("11%N 22%N33%%N").is_equal(s1))
  36. s1 := "[
  37. 11
  38. 22
  39. 33%N
  40. ]"
  41. assert(("%N%N11%N 22%N 33%%N").is_equal(s1))
  42. s1 := "bar{
  43. FF F
  44. }bar"
  45. assert((" FF F ").is_equal(s1))
  46. s1 := "bar{
  47. FF F
  48. FF F
  49. }bar"
  50. assert((" FF F %N FF F ").is_equal(s1))
  51. end
  52. end -- class TEST_VERBATIM_STRING2
  53. --
  54. -- ------------------------------------------------------------------------------------------------------------------------------
  55. -- Copyright notice below. Please read.
  56. --
  57. -- SmartEiffel is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License,
  58. -- as published by the Free Software Foundation; either version 2, or (at your option) any later version.
  59. -- SmartEiffel is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty
  60. -- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have
  61. -- received a copy of the GNU General Public License along with SmartEiffel; see the file COPYING. If not, write to the Free
  62. -- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  63. --
  64. -- Copyright(C) 1994-2002: INRIA - LORIA (INRIA Lorraine) - ESIAL U.H.P. - University of Nancy 1 - FRANCE
  65. -- Copyright(C) 2003-2006: INRIA - LORIA (INRIA Lorraine) - I.U.T. Charlemagne - University of Nancy 2 - FRANCE
  66. --
  67. -- Authors: Dominique COLNET, Philippe RIBET, Cyril ADRIAN, Vincent CROIZIER, Frederic MERIZEN
  68. --
  69. -- http://SmartEiffel.loria.fr - SmartEiffel@loria.fr
  70. -- ------------------------------------------------------------------------------------------------------------------------------