refactor: use fixture files for C, C++, and Elixir test content

This commit is contained in:
Paul Gauthier (aider) 2024-11-27 07:09:28 -08:00
parent 7465b4bf91
commit ec2b635a1a

View file

@ -335,26 +335,17 @@ class TestRepoMapAllLanguages(unittest.TestCase):
language_files = { language_files = {
"c": ( "c": (
"test.c", "test.c",
( "", # Now reads from fixture file
'#include <stdio.h>\n\nint main() {\n printf("Hello, World!\\n");\n '
" return 0;\n}\n"
),
"main", # Key symbol to check "main", # Key symbol to check
), ),
"cpp": ( "cpp": (
"test.cpp", "test.cpp",
( "", # Now reads from fixture file
'#include <iostream>\n\nint main() {\n std::cout << "Hello, World!" <<'
" std::endl;\n return 0;\n}\n"
),
"main", # Key symbol to check "main", # Key symbol to check
), ),
"elixir": ( "elixir": (
"test.ex", "test.ex",
( "", # Now reads from fixture file
'defmodule Greeter do\n def hello(name) do\n IO.puts("Hello, #{name}!")\n '
" end\nend\n"
),
"Greeter", # Key symbol to check "Greeter", # Key symbol to check
), ),
"java": ( "java": (