[tor-commits] [tor/master] Add a test for $ with non-delete commands.
nickm at torproject.org
nickm at torproject.org
Thu May 4 12:37:10 UTC 2017
commit df2bcaeb4ac5c8944212ed6f73b48bb026ac7cbb
Author: Nick Mathewson <nickm at torproject.org>
Date: Thu May 4 08:20:46 2017 -0400
Add a test for $ with non-delete commands.
---
src/test/test_consdiff.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/test/test_consdiff.c b/src/test/test_consdiff.c
index cdc1e6d..23948d6 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");
More information about the tor-commits
mailing list