acoeur/bin/_commands/content_test.bats
2022-11-05 22:23:24 +01:00

30 lines
709 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/test
}