summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/test-list.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/test-list.c b/src/test/test-list.c
index 399ec8e58e..f6da1a7053 100644
--- a/src/test/test-list.c
+++ b/src/test/test-list.c
@@ -45,6 +45,20 @@ int main(int argc, const char *argv[]) {
}
assert_se(i == ELEMENTSOF(items)-1);
+ i = 0;
+ LIST_FOREACH_OTHERS(item, cursor, &items[0]) {
+ i++;
+ assert_se(cursor != &items[0]);
+ }
+ assert_se(i == ELEMENTSOF(items)-1);
+
+ i = 0;
+ LIST_FOREACH_OTHERS(item, cursor, &items[3]) {
+ i++;
+ assert_se(cursor != &items[3]);
+ }
+ assert_se(i == ELEMENTSOF(items)-1);
+
assert_se(!LIST_JUST_US(item, head));
assert_se(items[0].item_next == NULL);