summaryrefslogtreecommitdiff
path: root/test/lit/help/tool-opts.test
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-07-07 15:46:17 +0000
committerGitHub <noreply@github.com>2021-07-07 08:46:17 -0700
commit11050145e91bdcac580a5cc7e651133f5089e84f (patch)
tree27644c3b529de2970c0a6883c7a511e5d2affc38 /test/lit/help/tool-opts.test
parentcdf9ee0fdff72384d2192fb32c20bf05287dba97 (diff)
downloadbinaryen-11050145e91bdcac580a5cc7e651133f5089e84f.tar.gz
binaryen-11050145e91bdcac580a5cc7e651133f5089e84f.tar.bz2
binaryen-11050145e91bdcac580a5cc7e651133f5089e84f.zip
Lit tests for tool help messages (#3965)
Add list tests for the help messages of all tools, factoring out common options into shared tests. This is slightly brittle because the text wrapping depends on the length of the longest option, but that brittleness should be worth the benefit of being able to see the actual help text in the tests.
Diffstat (limited to 'test/lit/help/tool-opts.test')
-rw-r--r--test/lit/help/tool-opts.test86
1 files changed, 86 insertions, 0 deletions
diff --git a/test/lit/help/tool-opts.test b/test/lit/help/tool-opts.test
new file mode 100644
index 000000000..2d3007779
--- /dev/null
+++ b/test/lit/help/tool-opts.test
@@ -0,0 +1,86 @@
+;; RUN: wasm-as --help | filecheck %s
+;; RUN: wasm-ctor-eval --help | filecheck %s
+;; RUN: wasm-dis --help | filecheck %s
+;; RUN: wasm-emscripten-finalize --help | filecheck %s
+;; RUN: wasm-metadce --help | filecheck %s
+;; RUN: wasm-split --help | filecheck %s
+
+wasm-as INFILE
+
+;; CHECK: Options:
+;; CHECK-NEXT:
+;; CHECK-NEXT: --version Output version information and exit
+;; CHECK-NEXT:
+;; CHECK-NEXT: --help,-h Show this help message and exit
+;; CHECK-NEXT:
+;; CHECK-NEXT: --debug,-d Print debug information to stderr
+;; CHECK-NEXT:
+;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features
+;; CHECK-NEXT:
+;; CHECK-NEXT: --all-features,-all Enable all features
+;; CHECK-NEXT:
+;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing)
+;; CHECK-NEXT:
+;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial
+;; CHECK-NEXT: warnings.
+;; CHECK-NEXT:
+;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing
+;; CHECK-NEXT: purposes.
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-threads Enable atomic operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-threads Disable atomic operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int
+;; CHECK-NEXT: operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int
+;; CHECK-NEXT: operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-simd Enable SIMD operations and types
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-simd Disable SIMD operations and types
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-tail-call Enable tail call operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-tail-call Disable tail call operations
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-reference-types Enable reference types
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-reference-types Disable reference types
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-multivalue Enable multivalue functions
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-multivalue Disable multivalue functions
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-gc Enable garbage collection
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-gc Disable garbage collection
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-memory64 Enable memory64
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-memory64 Disable memory64
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-typed-function-references Enable typed function references
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-typed-function-references Disable typed function references
+;; CHECK-NEXT:
+;; CHECK-NEXT: --enable-gc-nn-locals Enable GC non-null locals
+;; CHECK-NEXT:
+;; CHECK-NEXT: --disable-gc-nn-locals Disable GC non-null locals