Skip to content

Instantly share code, notes, and snippets.

@DavidGamba
DavidGamba / converter_manpage_test.rb
Created December 29, 2014 16:24
manpage backend
# encoding: UTF-8
unless defined? ASCIIDOCTOR_PROJECT_DIR
$: << File.dirname(__FILE__); $:.uniq!
require 'test_helper'
end
context 'Converter' do
context 'ManPageConverter' do
test 'should generate multiple authors in header' do
input = <<-EOS
@DavidGamba
DavidGamba / gist:b3287d40b019e498982c
Created May 22, 2014 05:14
Scala OptionParser that doesn't worry about descriptions (we write man pages for that)
def main(args: Array[String]) {
// Required positional arguments by key in options
val required = List('arg1, 'arg2)
// Options with value
val optional = Map("--option|-o" -> 'option, "-t|--test" -> 'test)
// Flags
val flags = Map("--flag1|-f" -> 'flag1, "--flag2" -> 'flag2)