summaryrefslogtreecommitdiff
path: root/test/prism/parse_comments_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/parse_comments_test.rb')
-rw-r--r--test/prism/parse_comments_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/prism/parse_comments_test.rb b/test/prism/parse_comments_test.rb
new file mode 100644
index 0000000000..30086e3155
--- /dev/null
+++ b/test/prism/parse_comments_test.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "test_helper"
+
+module Prism
+ class ParseCommentsTest < TestCase
+ def test_parse_comments
+ comments = Prism.parse_comments("# foo")
+
+ assert_kind_of Array, comments
+ assert_equal 1, comments.length
+ end
+
+ def test_parse_file_comments
+ comments = Prism.parse_file_comments(__FILE__)
+
+ assert_kind_of Array, comments
+ assert_equal 1, comments.length
+ end
+ end
+end