<commit_before>load File.dirname(__FILE__) + '/spec_helper.rb'

describe 'when building a C project' do

  include RakeBuilderHelper

  before( :all ) do
    @test_output_file = Rake::Path.expand_with_root( 'rake-c-testfile.txt', SPEC_PATH )
  end

  before( :each ) do
    Rake::Task.clear
    @project = c_task( :executable )
    @expected_generated = Rake::Path.expand_all_with_root( [ './main.o',  @project.makedepend_file, @project.target ], SPEC_PATH )
    `rm -f #{ @test_output_file }`
    `rm -f #{ @project.target }`
  end

  after( :each ) do
    Rake::Task[ 'clean' ].invoke
    `rm -f #{ @test_output_file }`
  end

  it "builds the program with 'build'" do
    chdir @project.rakefile_path
    Rake::Task[ 'build' ].invoke
    exist?( @project.target ).should be_true
  end

  it "runs the program with 'run'" do
    Rake::Task[ 'run' ].invoke
    exist?( @test_output_file ).should be_true
  end

end
<commit_msg>Cleanup after each<commit_after>load File.dirname(__FILE__) + '/spec_helper.rb'

describe 'when building a C project' do

  include RakeBuilderHelper

  before( :all ) do
    @test_output_file = Rake::Path.expand_with_root( 'rake-c-testfile.txt', SPEC_PATH )
  end

  before( :each ) do
    Rake::Task.clear
    @project = c_task( :executable )
    @expected_generated = Rake::Path.expand_all_with_root( [ './main.o',  @project.makedepend_file, @project.target ], SPEC_PATH )
    `rm -f #{ @test_output_file }`
    `rm -f #{ @project.target }`
  end

  after( :each ) do
    Rake::Task[ 'clean' ].invoke
    `rm -f #{ @test_output_file }`
    `rm -f '#{ @project.local_config }'`
  end

  it "builds the program with 'build'" do
    Rake::Task[ 'build' ].invoke
    exist?( @project.target ).should be_true
  end

  it "runs the program with 'run'" do
    Rake::Task[ 'run' ].invoke
    exist?( @test_output_file ).should be_true
  end

end

{'fraction_non_alphanumeric': 0.14125200642054575, 'fraction_numerical': 0.0, 'mean_word_length': 3.4, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5358770', 'n_tokens_mistral': 692, 'n_tokens_neox': 679, 'n_words': 169}