#!./cmissh -t -b connect http://Administrator:Administrator@cmis.demo.nuxeo.org/nuxeo/site/cmis/repository # Test main commands on root id match "^CMIS server.*" match -r "foobar" ls match "^default$" # Local command help help ls lpwd lls match "testscript" lpushd .. lpopd lcd . # Test main commands on 'default' object (Root) cd default id match "^Object.*of type Root$" ls match "^default-domain$" tree propget . match "^cmis:objectTypeId = Root$" propget . cmis:objectTypeId match "^Root$" # navigate around cd default-domain pwd match "^/default/default-domain$" ls match "^workspaces$" cd workspaces pwd ls cd .. pwd cd /default/default-domain/workspaces pushd .. popd # Create an object (a folder), test commands on it cd /default/default-domain mkdir testdir ls id testdir ls testdir tree testdir propget testdir match "^dc:title = testdir$" match "^cmis:baseTypeId = cmis:folder$" propget testdir dc:title # Test mkdir more in depth cd /default/default-domain mkdir ./testdir1 ls testdir1 mkdir testdir1/../testdir2 ls testdir1/../testdir2 cd testdir1 mkdir ../testdir3 ls ../testdir3 rm ../testdir3 cd .. #rm testdir? rm testdir1 rm testdir2 ls # Now a file cd testdir mkfile testfile ls id testfile ls testfile propget testfile match "^dc:title = testfile$" match "^cmis:baseTypeId = cmis:document$" propget testfile dc:title match "^testfile$" propset testfile dc:title some_other_title propget testfile dc:title match "^some_other_title$" setstream testfile testscript cat testfile rm testfile match -r "testfile" # Put a file put testscript testscript ls id testscript cat testscript rm testscript # Clean up cd .. rm testdir match -r "testdir" disconnect exit