Added some tests for escape sequences
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@701 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
da14e17b54
commit
0d5a00d1c5
2 changed files with 11 additions and 7 deletions
|
|
@ -6,7 +6,9 @@
|
||||||
#define ICONST 42
|
#define ICONST 42
|
||||||
#define FCONST 2.1828
|
#define FCONST 2.1828
|
||||||
#define CCONST 'x'
|
#define CCONST 'x'
|
||||||
|
#define CCONST2 '\n'
|
||||||
#define SCONST "Hello World"
|
#define SCONST "Hello World"
|
||||||
|
#define SCONST2 "\"Hello World\""
|
||||||
|
|
||||||
/* This should work just fine */
|
/* This should work just fine */
|
||||||
#define EXPR ICONST + 3*(FCONST)
|
#define EXPR ICONST + 3*(FCONST)
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,15 @@
|
||||||
catch { load ./example.so example}
|
catch { load ./example.so example}
|
||||||
catch { load ./example.dll example} ;# Windows
|
catch { load ./example.dll example} ;# Windows
|
||||||
|
|
||||||
puts "ICONST = $ICONST (should be 42)"
|
puts "ICONST = $ICONST (should be 42)"
|
||||||
puts "FCONST = $FCONST (should be 2.1828)"
|
puts "FCONST = $FCONST (should be 2.1828)"
|
||||||
puts "CCONST = $CCONST (should be 'x')"
|
puts "CCONS T = $CCONST (should be 'x')"
|
||||||
puts "SCONST = $SCONST (should be 'Hello World')"
|
puts "CCONST2 = $CCONST2 (this should be on a separate line)"
|
||||||
puts "EXPR = $EXPR (should be 48.5484)"
|
puts "SCONST = $SCONST (should be 'Hello World')"
|
||||||
puts "iconst = $iconst (should be 37)"
|
puts "SCONST2 = $SCONST2 (should be '\"Hello World\"')"
|
||||||
puts "fconst = $fconst (should be 3.14)"
|
puts "EXPR = $EXPR (should be 48.5484)"
|
||||||
|
puts "iconst = $iconst (should be 37)"
|
||||||
|
puts "fconst = $fconst (should be 3.14)"
|
||||||
|
|
||||||
if { [catch {
|
if { [catch {
|
||||||
puts "EXTERN = $EXTERN (Arg! This shouldn't print anything)"
|
puts "EXTERN = $EXTERN (Arg! This shouldn't print anything)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue