mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-03 05:38:30 -06:00
Commit the whole ./lib/ folder which stores the Crystal dependencies. This has a few benefits: - Allows to build the project without a connection to the Internet to retrieve dependencies. - Makes the project resistant against dependency re-tags which might include malicious code.
28 lines
861 B
Crystal
28 lines
861 B
Crystal
require "./spec_helper"
|
|
|
|
describe "Frame parsing" do
|
|
it "returns the correct label" do
|
|
frame = frame_for("from usr/crystal-lang/frame_spec.cr:6:7 in '->'")
|
|
frame.label.should eq("crystal")
|
|
|
|
frame = frame_for("from usr/crystal/frame_spec.cr:6:7 in '->'")
|
|
frame.label.should eq("crystal")
|
|
|
|
frame = frame_for("from lib/exception_page/spec/frame_spec.cr:6:7 in '->'")
|
|
frame.label.should eq("exception_page")
|
|
|
|
frame = frame_for("from lib/exception_page/frame_spec.cr:6:7 in '->'")
|
|
frame.label.should eq("exception_page")
|
|
|
|
frame = frame_for("from lib/frame_spec.cr:6:7 in '->'")
|
|
frame.label.should eq("app")
|
|
|
|
frame = frame_for("from src/frame_spec.cr:6:7 in '->'")
|
|
frame.label.should eq("app")
|
|
end
|
|
end
|
|
|
|
private def frame_for(backtrace_line)
|
|
ExceptionPage::FrameGenerator.generate_frames(backtrace_line).first
|
|
end
|