File: position_spec.rb

package info (click to toggle)
ruby-parslet 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,260 kB
  • sloc: ruby: 6,157; sh: 8; javascript: 3; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 285 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Encoding: UTF-8

require 'spec_helper'

describe Parslet::Position do
  slet(:position) { described_class.new('öäüö', 4) }

  it 'should have a charpos of 2' do
    position.charpos.should == 2
  end
  it 'should have a bytepos of 4' do
    position.bytepos.should == 4
  end
end