acoeur/bin/_commands/content_test.bats
2022-10-26 23:38:40 +02:00

31 lines
710 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
}