aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_consdiff.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-04 08:20:46 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-04 08:36:50 -0400
commitdf2bcaeb4ac5c8944212ed6f73b48bb026ac7cbb (patch)
tree2f1b4b95b8c3165f2c5c2123c7f1490cbe1de854 /src/test/test_consdiff.c
parent87f6979a03fa8d539fc81b67462f2f6cfc7f2960 (diff)
downloadtor-df2bcaeb4ac5c8944212ed6f73b48bb026ac7cbb.tar.gz
tor-df2bcaeb4ac5c8944212ed6f73b48bb026ac7cbb.zip
Add a test for $ with non-delete commands.
Diffstat (limited to 'src/test/test_consdiff.c')
-rw-r--r--src/test/test_consdiff.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/test_consdiff.c b/src/test/test_consdiff.c
index cdc1e6df5b..23948d6860 100644
--- a/src/test/test_consdiff.c
+++ b/src/test/test_consdiff.c
@@ -709,6 +709,16 @@ test_consdiff_apply_ed_diff(void *arg)
smartlist_clear(diff);
+ /* $ for a non-delete command. */
+ smartlist_add_linecpy(diff, area, "1,$c");
+ mock_clean_saved_logs();
+ cons2 = apply_ed_diff(cons1, diff, 0);
+ tt_ptr_op(NULL, OP_EQ, cons2);
+ expect_single_log_msg_containing("it wanted to use $ with a command "
+ "other than delete");
+
+ smartlist_clear(diff);
+
/* Script is not in reverse order. */
smartlist_add_linecpy(diff, area, "1d");
smartlist_add_linecpy(diff, area, "3d");