Added some tests for escape sequences

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@701 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-08-28 19:05:55 +00:00
commit db29f1317d
2 changed files with 11 additions and 7 deletions

View file

@ -6,7 +6,9 @@
#define ICONST 42
#define FCONST 2.1828
#define CCONST 'x'
#define CCONST2 '\n'
#define SCONST "Hello World"
#define SCONST2 "\"Hello World\""
/* This should work just fine */
#define EXPR ICONST + 3*(FCONST)

View file

@ -3,13 +3,15 @@
catch { load ./example.so example}
catch { load ./example.dll example} ;# Windows
puts "ICONST = $ICONST (should be 42)"
puts "FCONST = $FCONST (should be 2.1828)"
puts "CCONST = $CCONST (should be 'x')"
puts "SCONST = $SCONST (should be 'Hello World')"
puts "EXPR = $EXPR (should be 48.5484)"
puts "iconst = $iconst (should be 37)"
puts "fconst = $fconst (should be 3.14)"
puts "ICONST = $ICONST (should be 42)"
puts "FCONST = $FCONST (should be 2.1828)"
puts "CCONS T = $CCONST (should be 'x')"
puts "CCONST2 = $CCONST2 (this should be on a separate line)"
puts "SCONST = $SCONST (should be 'Hello World')"
puts "SCONST2 = $SCONST2 (should be '\"Hello World\"')"
puts "EXPR = $EXPR (should be 48.5484)"
puts "iconst = $iconst (should be 37)"
puts "fconst = $fconst (should be 3.14)"
if { [catch {
puts "EXTERN = $EXTERN (Arg! This shouldn't print anything)"