Skip to content

Commit

Permalink
Introduce expected_output.todo markers
Browse files Browse the repository at this point in the history
If expected*.todo file is present (alongside of the .css file)
this marks this test as "todo", which can be ignored with
--ignore-todo.

Therefore test which have some output formats passing,
but not the other ones can have a more fine-grained "todo"
granularity. Such tests should not be in the folders
that contain "todo", since then a whole test may be skipped.

Should fix: sass#333
  • Loading branch information
saper committed Sep 22, 2015
1 parent ae8f456 commit c2f280a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/sass_spec/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def initialize(input_scss, expected_css, error_file, status_file, style, clean,
# Probe filesystem once and cache the results
@should_fail = File.file?(@status_path)
@verify_stderr = File.file?(@error_path)
@todo = (@input_path.to_s.include? "todo") || File.file?(@expected_path.sub(/\.css$/, ".todo"))
end

def name
Expand Down Expand Up @@ -51,7 +52,7 @@ def should_fail?
end

def todo?
@input_path.to_s.include? "todo"
@todo
end

def output
Expand Down

0 comments on commit c2f280a

Please sign in to comment.