feat: Add R language test case and fixture for repository mapping

This commit is contained in:
Paul Gauthier (aider) 2025-03-12 15:16:02 -07:00
parent 73eb8701dd
commit 1ab6c70ac7
2 changed files with 18 additions and 0 deletions

View file

@ -313,6 +313,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
"commonlisp": ("lisp", "greet"),
"pony": ("pony", "Greeter"),
"properties": ("properties", "database.url"),
"r": ("r", "calculate"),
}
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"

17
tests/fixtures/languages/r/test.r vendored Normal file
View file

@ -0,0 +1,17 @@
# Simple R function for testing repository mapping
calculate <- function(x, y) {
# This function performs a simple calculation
result <- x * y
return(result)
}
# Another function to test detection
process_data <- function(data) {
# Process some data
return(data * 2)
}
# Example usage
sample_data <- c(1, 2, 3, 4, 5)
result <- calculate(10, 5)
processed <- process_data(sample_data)