mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
feat: Add R language test case and fixture for repository mapping
This commit is contained in:
parent
73eb8701dd
commit
1ab6c70ac7
2 changed files with 18 additions and 0 deletions
|
@ -313,6 +313,7 @@ class TestRepoMapAllLanguages(unittest.TestCase):
|
||||||
"commonlisp": ("lisp", "greet"),
|
"commonlisp": ("lisp", "greet"),
|
||||||
"pony": ("pony", "Greeter"),
|
"pony": ("pony", "Greeter"),
|
||||||
"properties": ("properties", "database.url"),
|
"properties": ("properties", "database.url"),
|
||||||
|
"r": ("r", "calculate"),
|
||||||
}
|
}
|
||||||
|
|
||||||
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"
|
fixtures_dir = Path(__file__).parent.parent / "fixtures" / "languages"
|
||||||
|
|
17
tests/fixtures/languages/r/test.r
vendored
Normal file
17
tests/fixtures/languages/r/test.r
vendored
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue