31 lines
705 B
Bash
Executable File
31 lines
705 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
setup() {
|
|
mkdir -p content/users/test
|
|
}
|
|
|
|
@test "Changing content" {
|
|
echo "---
|
|
title: Simple ac_choice edition test
|
|
---
|
|
|
|
hello world
|
|
" > content/users/test/content_test.md
|
|
# Necessary for the test setup, but not required in prod
|
|
echo "new content
|
|
On multiple lines" > content/users/test/content_test.content
|
|
|
|
bin/ac_route.sh "$(pwd)/content/users/test" content_test.content
|
|
|
|
[ -e content/users/test/content_test.md ]
|
|
|
|
cat content/users/test/content_test.md
|
|
grep -o "new content" content/users/test/content_test.md
|
|
grep -o "On multiple lines" content/users/test/content_test.md
|
|
grep -v "^hello world" content/users/test/content_test.md
|
|
}
|
|
|
|
teardown() {
|
|
rm -rf content/users
|
|
}
|