Sha256: a2912d8124844ca3fcf29d2fb751a40b50f045ba1bf873ff7f6038491f17bdc1
Contents?: true
Size: 770 Bytes
Versions: 3
Compression:
Stored size: 770 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper.rb')) class SchemeCompatabilityTest < Test::Unit::TestCase def setup @parser = Sexpistol.new end test "should parse #t as true" do ast = @parser.parse_string('#t') assert_equal [:"#t"], ast end test "should parse #f as false" do ast = @parser.parse_string('#f') assert_equal [:"#f"], ast end test "should allow comma quoting" do ast = @parser.parse_string("(this is '( a test))") assert_equal [[:this, :is, [:quote, [:a, :test]]]], ast end test "should allow complicated comma quoting" do ast = @parser.parse_string("(this is '( a test (also)))") assert_equal [[:this, :is, [:quote, [:a, :test, [:also]]]]], ast end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sexpistol-0.0.6 | test/unit/scheme_compatability_test.rb |
sexpistol-0.0.5 | test/unit/scheme_compatability_test.rb |
sexpistol-0.0.4 | test/unit/scheme_compatability_test.rb |