PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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