<commit_before>@c
Feature: C executable

	Scenario: Hello world
		Given a project configuration
		"""
		local c = require('configure.lang.c')

		function configure(build)
			local compiler = c.compiler.find{build = build}
			local exe = compiler:link_executable{
				name = "hello-world",
				sources = {'main.c', },
			}
		end
		"""
		And a source file main.c
		"""
		#include <stdio.h>
		int main() { printf("Hello, world!\n"); return 0; }
		"""
		When I configure and build
		Then I can launch bin/hello-world

	Scenario: Static runtime
		Given a project configuration
		"""
		local c = require('configure.lang.c')

		function configure(build)
			local compiler = c.compiler.find{build = build}
			local exe = compiler:link_executable{
				name = "hello-world",
				sources = {'main.c', },
				runtime = 'static',
			}
		end
		"""
		And a source file main.c
		"""
		#include <stdio.h>
		int main() { printf("Hello, world!\n"); return 0; }
		"""
		When I configure and build
		Then I can launch bin/hello-world
		And build/bin/hello-world is a static executable
<commit_msg>test.features: Use .exe extension to avoid special handling on windows.<commit_after>@c
Feature: C executable

	Scenario: Hello world
		Given a project configuration
		"""
		local c = require('configure.lang.c')

		function configure(build)
			local compiler = c.compiler.find{build = build}
			local exe = compiler:link_executable{
				name = "hello-world",
				sources = {'main.c', },
			}
		end
		"""
		And a source file main.c
		"""
		#include <stdio.h>
		int main() { printf("Hello, world!\n"); return 0; }
		"""
		When I configure and build
		Then I can launch bin/hello-world

	Scenario: Static runtime
		Given a project configuration
		"""
		local c = require('configure.lang.c')

		function configure(build)
			local compiler = c.compiler.find{build = build}
			local exe = compiler:link_executable{
				name = "hello-world",
				sources = {'main.c', },
				runtime = 'static',
				extension = '.exe'
			}
		end
		"""
		And a source file main.c
		"""
		#include <stdio.h>
		int main() { printf("Hello, world!\n"); return 0; }
		"""
		When I configure and build
		Then I can launch bin/hello-world.exe
		And build/bin/hello-world.exe is a static executable

{'fraction_non_alphanumeric': 0.13119143239625167, 'fraction_numerical': 0.00178491744756805, 'mean_word_length': 3.1595547309833023, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4104529', 'n_tokens_mistral': 846, 'n_tokens_neox': 706, 'n_words': 223}