@@ -250,3 +250,69 @@ Feature: Manage WP-CLI packages
250250
251251 When I run `wp package uninstall runcommand/hook`
252252 Then STDERR should be empty
253+
254+ Scenario : Get information about a single package
255+ Given an empty directory
256+
257+ When I try `wp package get runcommand/hook`
258+ Then STDERR should contain:
259+ """
260+ Error: Package 'runcommand/hook' is not installed.
261+ """
262+ And the return code should be 1
263+
264+ When I run `wp package install runcommand/hook`
265+ Then STDERR should be empty
266+
267+ When I run `wp package get runcommand/hook`
268+ Then STDOUT should contain:
269+ """
270+ runcommand/hook
271+ """
272+ And STDOUT should contain:
273+ """
274+ version
275+ """
276+
277+ When I run `wp package get runcommand/hook --fields=name,version`
278+ Then STDOUT should contain:
279+ """
280+ runcommand/hook
281+ """
282+ And STDOUT should contain:
283+ """
284+ version
285+ """
286+
287+ When I run `wp package get runcommand/hook --fields=version --format=json`
288+ Then STDOUT should contain:
289+ """
290+ "version"
291+ """
292+
293+ When I run `wp package get runcommand/hook --format=json`
294+ Then STDOUT should contain:
295+ """
296+ "name":"runcommand\/hook"
297+ """
298+ And STDOUT should contain:
299+ """
300+ "version"
301+ """
302+
303+ When I run `wp package get runcommand/hook --skip-update-check --fields=name,update,update_version`
304+ Then STDOUT should contain:
305+ """
306+ runcommand/hook
307+ """
308+ And STDOUT should contain:
309+ """
310+ none
311+ """
312+ And STDOUT should not contain:
313+ """
314+ available
315+ """
316+
317+ When I run `wp package uninstall runcommand/hook`
318+ Then STDERR should be empty
0 commit comments