File: 2001_bin_name.patch

package info (click to toggle)
rust-hypothesis 0.12.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 468 kB
  • sloc: makefile: 38; sh: 1
file content (158 lines) | stat: -rw-r--r-- 5,283 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Description: rename executable binary for co-existence with Python tool
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-04-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,6 +10,10 @@
 keywords = ["hypothesis", "annotation", "api", "cli"]
 categories = ["api-bindings", "command-line-utilities"]
 
+[[bin]]
+path = "src/main.rs"
+name = "hypothesis-client"
+
 [features]
 default = ["cli"]
 
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -15,7 +15,7 @@
 
 #[derive(Debug, Parser)]
 #[clap(
-    name = "hypothesis",
+    name = "hypothesis-client",
     about = "Call the Hypothesis API from the comfort of your terminal"
 )]
 pub enum HypothesisCLI {
--- a/tests/cli.rs
+++ b/tests/cli.rs
@@ -12,7 +12,7 @@
     key: &str,
     group_id: &str,
 ) -> color_eyre::Result<String> {
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     let output = cmd
         .env("HYPOTHESIS_NAME", username)
         .env("HYPOTHESIS_KEY", key)
@@ -41,7 +41,7 @@
     let id = id.unwrap();
 
     // Fetch created annotation
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("annotations")
@@ -53,7 +53,7 @@
         );
 
     // Delete annotation
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("annotations")
@@ -77,7 +77,7 @@
     let id = id.unwrap();
 
     // Update annotation
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("annotations")
@@ -88,7 +88,7 @@
         .stdout(predicate::str::starts_with("Updated").and(predicate::str::contains(&id)));
 
     // Fetch updated annotation
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("annotations")
@@ -98,7 +98,7 @@
         .stdout(predicate::str::contains(&id).and(predicate::str::contains("test text 2")));
 
     // Delete annotation
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("annotations")
@@ -121,7 +121,7 @@
 
     let duration = time::Duration::from_millis(500);
     thread::sleep(duration);
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     let output = cmd
         .env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
@@ -139,7 +139,7 @@
     }
     assert_eq!(count, 4);
     for id in ids {
-        let mut cmd = Command::cargo_bin("hypothesis")?;
+        let mut cmd = Command::cargo_bin("hypothesis-client")?;
         cmd.env("HYPOTHESIS_NAME", &username)
             .env("HYPOTHESIS_KEY", &key)
             .arg("annotations")
@@ -157,7 +157,7 @@
     username: &str,
     key: &str,
 ) -> color_eyre::Result<String> {
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     let output = cmd
         .env("HYPOTHESIS_NAME", username)
         .env("HYPOTHESIS_KEY", key)
@@ -184,7 +184,7 @@
     let group_id = group_id.unwrap();
 
     // Fetch created group
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("groups")
@@ -194,7 +194,7 @@
         .stdout(predicate::str::contains(&group_id).and(predicate::str::contains("test_name")));
 
     // Leave group
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("groups")
@@ -219,7 +219,7 @@
     let group_id = group_id.unwrap();
 
     // Update group
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("groups")
@@ -234,7 +234,7 @@
         )));
 
     // Check that update worked
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("groups")
@@ -244,7 +244,7 @@
         .stdout(predicate::str::contains(&group_id).and(predicate::str::contains("test_group_2")));
 
     // Leave group
-    let mut cmd = Command::cargo_bin("hypothesis")?;
+    let mut cmd = Command::cargo_bin("hypothesis-client")?;
     cmd.env("HYPOTHESIS_NAME", &username)
         .env("HYPOTHESIS_KEY", &key)
         .arg("groups")