summaryrefslogtreecommitdiff
path: root/src/test/test_dir.c
diff options
context:
space:
mode:
authorjuga0 <juga@riseup.net>2018-05-03 08:29:57 +0000
committerNick Mathewson <nickm@torproject.org>2018-05-08 14:24:29 -0400
commitdbc80ad19b8a27aab557fe7930e18eef8f415133 (patch)
treecb83547c7ab9af543fa2198aefc176464a0c62c5 /src/test/test_dir.c
parent34e7dca9c9e902a58fe8942cef666f1d99d06030 (diff)
downloadtor-dbc80ad19b8a27aab557fe7930e18eef8f415133.tar.gz
tor-dbc80ad19b8a27aab557fe7930e18eef8f415133.zip
Allow bandwidth-file lines to have node_id in the last position
Closes ticket 26004.
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r--src/test/test_dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index cdc56acb89..b3817a0929 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -1314,6 +1314,13 @@ test_dir_measured_bw_kb(void *arg)
"bw=1024 junk=007\n",
"misc=junk node_id=$557365204145532d32353620696e73746561642e "
"bw=1024 junk=007\n",
+ /* check whether node_id can be at the end */
+ "bw=1024 node_id=$557365204145532d32353620696e73746561642e\n",
+ /* check whether node_id can be at the end and bw has something in front*/
+ "foo=bar bw=1024 node_id=$557365204145532d32353620696e73746561642e\n",
+ /* check whether node_id can be at the end and something in the
+ * in the middle of bw and node_id */
+ "bw=1024 foo=bar node_id=$557365204145532d32353620696e73746561642e\n",
"end"
};
const char *lines_fail[] = {