1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# -*- coding: utf-8 -*- #
# frozen_string_literal: true
describe Rouge::Lexers::Racket do
let(:subject) { Rouge::Lexers::Racket.new }
describe 'guessing' do
include Support::Guessing
it 'guesses by filename' do
assert_guess :filename => 'foo.rkt'
assert_guess :filename => 'foo.rktd'
assert_guess :filename => 'foo.rktl'
end
it 'guesses by mimetype' do
assert_guess :mimetype => 'text/x-racket'
assert_guess :mimetype => 'application/x-racket'
end
it 'guesses by text' do
assert_guess :source => "#lang racket\n(define x 2)"
assert_guess :source => '#lang scribble'
assert_guess :source => '#lang typed/racket'
end
end
end
|