From 16c9b3042d925270d1536429a239261b5a7df9b8 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 5 Jan 2022 11:42:13 -0800 Subject: Add categories to --help text (#4421) The general shape of the --help output is now: ======================== wasm-foo Does the foo operation ======================== wasm-foo opts: -------------- --foo-bar .. Tool opts: ---------- .. The options are now in categories, with the more specific ones - most likely to be wanted by the user - first. I think this makes the list a lot less confusing. In particular, in wasm-opt all the opt passes are now in their own category. Also add a script to make it easy to update the help tests. --- test/lit/help/wasm-shell.test | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'test/lit/help/wasm-shell.test') diff --git a/test/lit/help/wasm-shell.test b/test/lit/help/wasm-shell.test index c171e1428..c93045ef9 100644 --- a/test/lit/help/wasm-shell.test +++ b/test/lit/help/wasm-shell.test @@ -1,10 +1,21 @@ ;; RUN: wasm-shell --help | filecheck %s - -wasm-shell INFILE - -;; CHECK: Execute .wast files +;; CHECK: ================================================================================ +;; CHECK-NEXT: wasm-shell INFILE ;; CHECK-NEXT: -;; CHECK-NEXT: Options: +;; CHECK-NEXT: Execute .wast files +;; CHECK-NEXT: ================================================================================ +;; CHECK-NEXT: +;; CHECK-NEXT: +;; CHECK-NEXT: wasm-shell options: +;; CHECK-NEXT: ------------------- +;; CHECK-NEXT: +;; CHECK-NEXT: --entry,-e Call the entry point after parsing the module +;; CHECK-NEXT: +;; CHECK-NEXT: --skip,-s Skip input on certain lines (comma-separated-list) +;; CHECK-NEXT: +;; CHECK-NEXT: +;; CHECK-NEXT: General options: +;; CHECK-NEXT: ---------------- ;; CHECK-NEXT: ;; CHECK-NEXT: --version Output version information and exit ;; CHECK-NEXT: @@ -12,6 +23,3 @@ wasm-shell INFILE ;; CHECK-NEXT: ;; CHECK-NEXT: --debug,-d Print debug information to stderr ;; CHECK-NEXT: -;; CHECK-NEXT: --entry,-e Call the entry point after parsing the module -;; CHECK-NEXT: -;; CHECK-NEXT: --skip,-s Skip input on certain lines (comma-separated-list) -- cgit v1.2.3