Update of /cvsroot/monetdb/pathfinder/tests/BugTracker/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4106/tests/BugTracker/Tests

Added Files:
      Tag: M5XQ
        update-with-timing.SF-2852928.XQUERY.py 
Log Message:
propagated changes of Friday Sep 11 2009
from the development trunk to the M5XQ branch

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/11 - sjoerd:
        tests/BugTracker/Tests/update-with-timing.SF-2852928.XQUERY.py,1.2
propagated changes of Thursday Sep 10 2009 - Friday Sep 11 2009
from the Aug2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/10 - sjoerd:
        tests/BugTracker/Tests/update-with-timing.SF-2852928.XQUERY.py,1.1.2.1
Added test for bug 2852928: PF: updates broken using algebra front-end?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--- NEW FILE: update-with-timing.SF-2852928.XQUERY.py ---
import os, sys
try:
    import subprocess
except ImportError:
    # user private copy for old Python versions
    import MonetDBtesting.subprocess26 as subprocess

def client(cmd, input = None):
    clt = subprocess.Popen(cmd,
                           stdin = subprocess.PIPE,
                           stdout = subprocess.PIPE,
                           stderr = subprocess.PIPE,
                           universal_newlines = True)
    out, err = clt.communicate(input)
    sys.stdout.write(out)
    sys.stderr.write(err)

hellodoc = r'''
<hello x="y" lang="en">
  <foo>text of node foo<bar>text of node bar</bar></foo>
  <!-- a comment node -->
  <?pi action=beep?>
  <world/>
  <path>\asfda\asdfasf\asdf</path>
</hello>
'''

def main():
    xq_client = os.getenv('XQUERY_CLIENT').split()
    # HACK ALERT: create updatable document by appending ,10 to collection name
    client(xq_client + ['--input=hello-SF.2852928.xml', 
'--collection=hello-SF.2852928.xml,10'],
           hellodoc)
    sys.stdout.write('#~BeginVariableOutput~#\n')
    client(xq_client + ['-t', '-s', 'do insert <a/> into 
doc("hello-SF.2852928.xml")/hello'])
    sys.stdout.write('#~EndVariableOutput~#\n')
    client(xq_client + ['-s', 'doc("hello-SF.2852928.xml")'])
    client(xq_client + ['-s', 'pf:del-doc("hello-SF.2852928.xml")'])

main()


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to