This commit is contained in:
14
e2e/r/tests/test_code.R
generated
Normal file
14
e2e/r/tests/test_code.R
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
# This file is auto-generated by alef — DO NOT EDIT.
|
||||
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
|
||||
# To regenerate: alef generate
|
||||
# To verify freshness: alef verify --exit-code
|
||||
# Issues & docs: https://github.com/kreuzberg-dev/alef
|
||||
# E2e tests for category: code
|
||||
|
||||
test_that("code_shebang_detection: Test language detection from shebang line via bytes input", {
|
||||
result <- jsonlite::fromJSON(extract_file_sync(path = .resolve_fixture("code/script.sh"), mime_type = "text/x-source-code", config = ExtractionConfig$default()), simplifyVector = FALSE)
|
||||
expect_equal(trimws(result$mime_type), "text/x-source-code")
|
||||
expect_true(nchar(result$content) >= 10)
|
||||
expect_true(any(grepl("build", result$content, fixed = TRUE)))
|
||||
expect_true(any(grepl("clean", result$content, fixed = TRUE)))
|
||||
})
|
||||
Reference in New Issue
Block a user