summaryrefslogtreecommitdiff
path: root/tests/remembering.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/remembering.go')
-rw-r--r--tests/remembering.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/remembering.go b/tests/remembering.go
index 3f8e446..5c3b705 100644
--- a/tests/remembering.go
+++ b/tests/remembering.go
@@ -505,6 +505,29 @@ func test_run_flow() {
assertEq(out, "x\n")
assertEq(errW, "warn\n")
})
+
+ testing("attached -pNAME is accepted", func() {
+ rc, out, _ := runWith(
+ "b\na\n",
+ "-pt8", "--", "head", "-n1",
+ )
+ assertEq(rc, 0)
+ assertEq(out, "a\n")
+ assertEq(
+ profileContent("t8"),
+ "1 profile a\n0 profile b\n",
+ )
+ })
+
+ testing("-- shields the command's argv", func() {
+ rc, out, _ := runWith(
+ "",
+ "-p", "t9", "--",
+ "sh", "-c", "echo \"$0\"", "-pz",
+ )
+ assertEq(rc, 0)
+ assertEq(out, "-pz\n")
+ })
})
}