You can query the used options like so:

```ruby
  test do
    options = Tab.for_formula('ed').used_options
    ed = options.any? {|t| t.name == 'default-names'} ? 'ed' : 'ged'
    system bin/ed, "--version"
  end
```