Chris Hillery has proposed merging lp:~zorba-coders/zorba/fix-basename-tests into lp:zorba.
Commit message: Remove "system" module dependency from core tests. Requested reviews: Juan Zacarias (juan457) Chris Hillery (ceejatec) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-basename-tests/+merge/174117 -- https://code.launchpad.net/~zorba-coders/zorba/fix-basename-tests/+merge/174117 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'test/rbkt/Queries/CMakeLists.txt' --- test/rbkt/Queries/CMakeLists.txt 2013-06-18 11:51:57 +0000 +++ test/rbkt/Queries/CMakeLists.txt 2013-07-11 06:24:25 +0000 @@ -497,11 +497,6 @@ ENDIF (FOUND_XQFTTS AND NOT ZORBA_TEST_W3C_TO_SUBMIT_RESULTS) -# The dirname_basename test depends on the system module -#IF (NOT zorba_system_module_BINARY_DIR) -# EXPECTED_FAILURE (test/rbkt/zorba/file/dirname_basename ????need bugnum???) -#ENDIF () - # test that must fail to pass, to check testdriver BOM bug that gives false positives EXPECTED_FAILURE (test/rbkt/zorba/testdriver/bom_bug 3381121) === modified file 'test/rbkt/Queries/zorba/file/dirname_basename-00.xq' --- test/rbkt/Queries/zorba/file/dirname_basename-00.xq 2013-06-12 23:54:27 +0000 +++ test/rbkt/Queries/zorba/file/dirname_basename-00.xq 2013-07-11 06:24:25 +0000 @@ -1,11 +1,10 @@ import module namespace file = "http://expath.org/ns/file"; -import module namespace sys = "http://www.zorba-xquery.com/modules/system"; declare function local:do( $path ) { fn:concat( file:dir-name( $path ), '-', file:base-name( $path ) ) }; -if ( sys:property($sys:os-name) eq "Windows" ) +if ( file:directory-separator() eq "\" ) then let $path := "C:\a\b.txt" return file:base-name( $path, ".txt" ) eq "b" === modified file 'test/rbkt/Queries/zorba/file/dirname_basename-01.xq' --- test/rbkt/Queries/zorba/file/dirname_basename-01.xq 2013-06-12 23:54:27 +0000 +++ test/rbkt/Queries/zorba/file/dirname_basename-01.xq 2013-07-11 06:24:25 +0000 @@ -1,11 +1,10 @@ import module namespace file = "http://expath.org/ns/file"; -import module namespace sys = "http://www.zorba-xquery.com/modules/system"; declare function local:do( $path ) { fn:concat( file:dir-name( $path ), '|', file:base-name( $path ) ) }; -if ( sys:property($sys:os-name) eq "Windows" ) +if ( file:directory-separator() eq "\" ) then let $path := "C:\a\b" return local:do( $path ) eq "C:\a|b" === modified file 'test/rbkt/Queries/zorba/file/dirname_basename-02.xq' --- test/rbkt/Queries/zorba/file/dirname_basename-02.xq 2013-06-12 23:54:27 +0000 +++ test/rbkt/Queries/zorba/file/dirname_basename-02.xq 2013-07-11 06:24:25 +0000 @@ -1,11 +1,10 @@ import module namespace file = "http://expath.org/ns/file"; -import module namespace sys = "http://www.zorba-xquery.com/modules/system"; declare function local:do( $path ) { fn:concat( file:dir-name( $path ), '|', file:base-name( $path ) ) }; -if ( sys:property($sys:os-name) eq "Windows" ) +if ( file:directory-separator() eq "\" ) then let $path := "C:\a" return local:do( $path ) eq "C:\|a" === modified file 'test/rbkt/Queries/zorba/file/dirname_basename-03.xq' --- test/rbkt/Queries/zorba/file/dirname_basename-03.xq 2013-06-12 23:54:27 +0000 +++ test/rbkt/Queries/zorba/file/dirname_basename-03.xq 2013-07-11 06:24:25 +0000 @@ -1,11 +1,10 @@ import module namespace file = "http://expath.org/ns/file"; -import module namespace sys = "http://www.zorba-xquery.com/modules/system"; declare function local:do( $path ) { fn:concat( file:dir-name( $path ), '|', file:base-name( $path ) ) }; -if ( sys:property($sys:os-name) eq "Windows" ) +if ( file:directory-separator() eq "\" ) then let $path := "C:\" return local:do( $path ) eq "C:\|C:\" === modified file 'test/rbkt/Queries/zorba/file/dirname_basename-04.xq' --- test/rbkt/Queries/zorba/file/dirname_basename-04.xq 2013-06-12 23:54:27 +0000 +++ test/rbkt/Queries/zorba/file/dirname_basename-04.xq 2013-07-11 06:24:25 +0000 @@ -1,16 +1,10 @@ import module namespace file = "http://expath.org/ns/file"; -import module namespace sys = "http://www.zorba-xquery.com/modules/system"; declare function local:do( $path ) { fn:concat( file:dir-name( $path ), '|', file:base-name( $path ) ) }; -if ( sys:property($sys:os-name) eq "Windows" ) -then - let $path := "a\b" - return local:do( $path ) eq "a|b" -else - let $path := "a/b" - return local:do( $path ) eq "a|b" +let $path := fn:concat("a", file:directory-separator(), "b") +return local:do( $path ) eq "a|b" (: vim:set et sw=2 ts=2: :) === modified file 'test/rbkt/Queries/zorba/file/dirname_basename-06.xq' --- test/rbkt/Queries/zorba/file/dirname_basename-06.xq 2013-06-12 23:54:27 +0000 +++ test/rbkt/Queries/zorba/file/dirname_basename-06.xq 2013-07-11 06:24:25 +0000 @@ -1,11 +1,10 @@ import module namespace file = "http://expath.org/ns/file"; -import module namespace sys = "http://www.zorba-xquery.com/modules/system"; declare function local:do( $path ) { fn:concat( file:dir-name( $path ), '|', file:base-name( $path ) ) }; -if ( sys:property($sys:os-name) eq "Windows" ) +if ( file:directory-separator() eq "\" ) then let $path := "C:\a\\\" return local:do( $path ) eq "C:\|a"
-- Mailing list: https://launchpad.net/~zorba-coders Post to : [email protected] Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp

