aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2016-04-22 21:24:56 -0400
committerTeddy Wing2016-04-22 21:24:56 -0400
commit6f078aecf87d39882c0fce1cc61b6220add43208 (patch)
tree4e13736344493bcbee70d65d275b8b37fc726afb
parentb9f6915d1e92f77c002f05a1371941dd3e3dcb95 (diff)
downloadmutt-alias-auto-add-6f078aecf87d39882c0fce1cc61b6220add43208.tar.bz2
test.sh: Initial stab at an integration test
Would like to modify the program to take a `--file` attribute so that we can supply a file on the command line to do an integration test with. The idea is that we pipe an email to the program and check that the right alias was added to our aliases file.
-rw-r--r--test.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100644
index 0000000..d23a1b9
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+cargo build
+
+function test_creates_a_new_alias_for_a_contact_with_an_existing_name() {
+ cp testdata/aliases testdata/tmp
+ # echo 'alias paris-numa NUMA Paris <communique@numa.co>' >> testdata/tmp
+ # echo 'alias paris-numa NUMA Paris <communique@numa.co>' >> ./testaliases
+
+ cat testdata/email | ./target/debug/alias-auto-add
+
+
+
+ # rm testdata/tmp
+}
+
+
+test_creates_a_new_alias_for_a_contact_with_an_existing_name