diff --git a/t/t1000-kvs.t b/t/t1000-kvs.t index 58db2bb4e702..3d0a067b357f 100755 --- a/t/t1000-kvs.t +++ b/t/t1000-kvs.t @@ -278,6 +278,56 @@ EOF test_cmp expected output ' +# +# ls tests +# +test_expect_success 'kvs: ls -1F DIR works' ' + flux kvs unlink -Rf $DIR && + flux kvs put $DIR.a=69 && + flux kvs mkdir $DIR.b && + flux kvs link b $DIR.c && + flux kvs ls -1F $DIR | sort >output && + cat >expected <<-EOF && + a + b. + c@ + EOF + test_cmp expected output +' +test_expect_success 'kvs: ls -1Fd DIR.a DIR.b DIR.c works' ' + flux kvs unlink -Rf $DIR && + flux kvs put $DIR.a=69 && + flux kvs mkdir $DIR.b && + flux kvs link b $DIR.c && + flux kvs ls -1Fd $DIR.a $DIR.b $DIR.c | sort >output && + cat >expected <<-EOF && + $DIR.a + $DIR.b. + $DIR.c@ + EOF + test_cmp expected output +' +test_expect_success 'kvs: ls -1RCF shows directory titles' ' + flux kvs unlink -Rf $DIR && + flux kvs put $DIR.a=69 && + flux kvs put $DIR.b.d=42 && + flux kvs link b $DIR.c && + flux kvs ls -1RCF $DIR | grep : | wc -l >output && + cat >expected <<-EOF && + 2 + EOF + test_cmp expected output +' +test_expect_success 'kvs: ls -C works' ' + flux kvs unlink -Rf $DIR && + ${FLUX_BUILD_DIR}/t/kvs/dtree -p$DIR -h2 -w50 && + flux kvs ls -C -w80 $DIR | wc -wl >output && + cat >expected <<-EOF && + 5 50 + EOF + test_cmp expected output +' + # # get corner case tests #