~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/bindings/swig/ruby/test/test_core.rb

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# encoding = utf-8
1
2
# ====================================================================
2
3
#    Licensed to the Apache Software Foundation (ASF) under one
3
4
#    or more contributor license agreements.  See the NOTICE file
52
53
    now = Time.now.gmtime
53
54
    str = now.strftime("%Y-%m-%dT%H:%M:%S.") + "#{now.usec}Z"
54
55
 
55
 
    assert_equal(now, Time.from_svn_format(str))
 
56
    if RUBY_VERSION > '1.9'
 
57
      # ruby 1.9 Time comparison gets into the nano-seconds, strftime
 
58
      # shaves these off. So we can compare epoch time instead
 
59
      assert_equal(now.to_i, Time.from_svn_format(str).gmtime.to_i)
 
60
    else
 
61
      assert_equal(now, Time.from_svn_format(str).gmtime)
 
62
    end
56
63
 
57
64
    apr_time = now.to_i * 1000000 + now.usec
58
65
    assert_equal(apr_time, now.to_apr_time)
244
251
      config_infos << [section, name, value]
245
252
    end
246
253
    assert_equal(infos.sort, config_infos.sort)
247
 
    assert_equal(infos.sort, config.collect {|args| args}.sort)
 
254
    if RUBY_VERSION > '1.9'
 
255
      assert_equal(infos.sort, config.collect {|sect,name,val| [sect,name,val]}.sort)
 
256
    else
 
257
      assert_equal(infos.sort, config.collect {|args| args}.sort)
 
258
    end
248
259
  end
249
260
 
250
261
  def test_config_find_group
532
543
    date_str = now.strftime("%Y-%m-%dT%H:%M:%S")
533
544
    date_str << ".#{now.usec}Z"
534
545
    info.date = date_str
535
 
    assert_equal(now, info.date)
 
546
    if RUBY_VERSION > '1.9'
 
547
      # ruby 1.9 Time comparison gets into the nano-seconds, strftime
 
548
      # shaves these off. So we can compare epoch time instead
 
549
      assert_equal(now.to_i, info.date.gmtime.to_i)
 
550
    else
 
551
      assert_equal(now, info.date.gmtime)
 
552
    end
536
553
  end
537
554
 
538
555
  def test_svn_prop