Update of /cvsroot/monetdb/sql/src/test/mapi/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv496

Added Files:
      Tag: SQL_2-24
        utf8test.SQL.py 
Removed Files:
      Tag: SQL_2-24
        utf8test.SQL.bat utf8test.SQL.sh 
Log Message:
Use Python instead of a cmd script since the cmd script didn't work.

--- utf8test.SQL.bat DELETED ---

--- NEW FILE: utf8test.SQL.py ---
import os, sys
try:
    import subprocess
except ImportError:
    # use private copy for old Python versions
    import MonetDB.subprocess26 as subprocess

def client(cmd):
    clt = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
    sys.stdout.write(clt.stdout.read())
    clt.stdout.close()
    sys.stderr.write(clt.stderr.read())
    clt.stderr.close()

def main():
    mclient = os.getenv('SQL_CLIENT')
    client('%s -s "create table utf8test (s varchar(50))"' % mclient)
    client('%s -s "insert into utf8test values (\'value without special 
characters\')"' % mclient)
    client('%s -s "insert into utf8test values (\'funny characters: 
\303\240\303\241\303\242\303\243\303\244\303\245\')"' % mclient)
    client('%s -fraw -s "select * from utf8test"' % mclient)
    client('%s -fsql -s "select * from utf8test"' % mclient)
    client('%s -fraw -Eiso-8859-1 -s "select * from utf8test"' % mclient)
    client('%s -fsql -Eiso-8859-1 -s "select * from utf8test"' % mclient)
    client('%s -s "drop table utf8test"' % mclient)

main()

--- utf8test.SQL.sh DELETED ---


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to