@@ -53,6 +53,11 @@ for input in ${SHARNESS_TEST_SRCDIR}/flux-resource/list/*.json; do
5353 test_debug "cat ${name}-info.output" &&
5454 test_cmp ${base}-info.expected ${name}-info.output
5555 '
56+ test_expect_success " flux-resource R input check: $testname " '
57+ flux resource R --from-stdin < $input > ${name}-R.output 2>&1 &&
58+ test_debug "cat ${name}-info.output" &&
59+ test_cmp ${base}.R ${name}-R.output
60+ '
5661done
5762
5863# Ensure all tested inputs can also work with --include
@@ -73,6 +78,11 @@ for input in ${SHARNESS_TEST_SRCDIR}/flux-resource/list/*.json; do
7378 test_debug "cat ${name}-info-include.output" &&
7479 grep "1 Node" ${name}-info-include.output
7580 '
81+ test_expect_success " flux-resource R input ---include check: $testname " '
82+ flux resource R --from-stdin -i0 < $input \
83+ > ${name}-info-R.output &&
84+ test "$(flux R decode --count=node <${name}-info-R.output)" -eq 1
85+ '
7686done
7787
7888test_expect_success ' flux-resource list supports --include' '
@@ -99,6 +109,14 @@ test_expect_success 'flux-resource list: --include works with invalid host' '
99109 test_debug "cat include-invalid-hosts.out" &&
100110 grep "^0" include-invalid-hosts.out
101111'
112+ test_expect_success ' flux-resource R supports --states' '
113+ flux resource R --from-stdin -s all <$INPUT >all.R &&
114+ test $(flux R decode --count=node <all.R) -eq 5 &&
115+ flux resource R --from-stdin -s up <$INPUT >up.R &&
116+ test $(flux R decode --count=node <up.R) -eq 5 &&
117+ flux resource R --from-stdin -s down <$INPUT >down.R &&
118+ test $(flux R decode --count=node <down.R) -eq 0
119+ '
102120test_expect_success ' create test input with properties' '
103121 cat <<-EOF >properties-test.in
104122 {
0 commit comments