Skip to content

Instantly share code, notes, and snippets.

View mrerrormessage's full-sized avatar

Robert G mrerrormessage

View GitHub Profile
abstract class InputBoxType[T](val name:String)
case object Num extends InputBoxType[Double]("Number")
case object Str extends InputBoxType[String]("String")
case object StrReporter extends InputBoxType[String]("String (reporter)")
case object StrCommand extends InputBoxType[String]("String (commands)")
case object Col extends InputBoxType[Int]("Color")
case class InputBox[T](left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, varName: String, value: T, multiline: Boolean = false, boxtype: InputBoxType[T]){
def say: String = boxtype match {
case c: Col.type => "hello"
case _ => "goodbye"
@mrerrormessage
mrerrormessage / export.c
Created January 19, 2013 21:07
Gotta love this. From GNUPG
#ifdef ENABLE_SELINUX_HACKS
if (secret) {
log_error (_("exporting secret keys not allowed\n"));
rc = G10ERR_GENERAL;
goto leave;
}
#endif
Scenario Outline: Profile creation with invalid fields
Given I am a registered user without a profile
And I login
And visit the profile creation page
When I fill in "<field>" with "<value>"
And I fill in valid values for all other fields
And submit the form
Then I should see an "<error>"
Examples: