test: add Racket test case and fixture

This commit is contained in:
Paul Gauthier (aider) 2025-03-12 15:18:47 -07:00
parent 1ab6c70ac7
commit a776d70e0d
2 changed files with 10 additions and 1 deletions

View file

@ -314,6 +314,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
"pony": ("pony", "Greeter"), "pony": ("pony", "Greeter"),
"properties": ("properties", "database.url"), "properties": ("properties", "database.url"),
"r": ("r", "calculate"), "r": ("r", "calculate"),
"racket": ("rkt", "greet"),
} }
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages" fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"
@ -338,7 +339,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
io = InputOutput() io = InputOutput()
repo_map = RepoMap(main_model=self.GPT35, root=temp_dir, io=io) repo_map = RepoMap(main_model=self.GPT35, root=temp_dir, io=io)
other_files = [filename] other_files = [test_file]
result = repo_map.get_repo_map([], other_files) result = repo_map.get_repo_map([], other_files)
dump(lang) dump(lang)
dump(result) dump(result)

View file

@ -0,0 +1,8 @@
#lang racket
;; Define a simple greeting function
(define (greet name)
(string-append "Hello, " name "!"))
;; Example usage
(greet "World")