Skip to content

Commit

Permalink
note that UTF-8 paths are not supported yet, will be added as an opt-…
Browse files Browse the repository at this point in the history
…in later
  • Loading branch information
anmarchenko committed Mar 15, 2024
1 parent 9bac1c4 commit e887707
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/datadog/ci/cov/calculator/code_with_❤️.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class I❤️Ruby
def call
"I ❤️ Ruby"
end
end
9 changes: 9 additions & 0 deletions spec/datadog/ci/cov/cov_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require "datadog_cov.#{RUBY_VERSION}_#{RUBY_PLATFORM}" unless PlatformHelpers.jruby?

require_relative "calculator/calculator"
require_relative "calculator/code_with_❤️"

RSpec.describe "Datadog::CI::Cov" do
before do
Expand Down Expand Up @@ -35,6 +36,14 @@ def absolute_path(path)
absolute_path("calculator/operations/subtract.rb")
)
end

it "does not support files with non-ASCII characters yet due to additional overhead of UTF-8 strings parsing" do
subject.start
expect(I❤️Ruby.new.call).to eq("I ❤️ Ruby")
coverage = subject.stop
expect(coverage.size).to eq(1)
expect(coverage.keys.first).to include("calculator/code_with_")
end
end

context "when root is in deeply nested dir" do
Expand Down

0 comments on commit e887707

Please sign in to comment.