Sha256: dde47c375a6b3512171da8f45416dce640a9740706aae689ba598fa988ff5f04

Contents?: true

Size: 987 Bytes

Versions: 4

Compression:

Stored size: 987 Bytes

Contents

#!/usr/bin/env ruby -w
# encoding: UTF-8
#
# = IntervalList_spec.rb -- The TaskJuggler III Project Management Software
#
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011
#               by Chris Schlaeger <chris@linux.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#

require 'rubygems'

require 'taskjuggler/ICalendar'

class TaskJuggler

  describe ICalendar do

    describe ICalendar::Component do

      it 'should quote properly' do
        c = ICalendar::Component.new(nil, '', nil, nil)
        [
          [ '', '' ],
          [ 'foo', 'foo' ],
          [ '"', '\"' ],
          [ ';', '\;' ],
          [ ',', '\,' ],
          [ "\n", '\n' ],
          [ "foo\nbar", 'foo\nbar' ],
          [ 'a"b"c', 'a\"b\"c' ]
        ].each do |i, o|
          c.send('quoted', i).should == o
        end
      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
taskjuggler-3.0.0 spec/ICalendar_spec.rb
taskjuggler-0.2.2 spec/ICalendar_spec.rb
taskjuggler-0.2.1 spec/ICalendar_spec.rb
taskjuggler-0.2.0 spec/ICalendar_spec.rb