Running cabal install
for the first time, we get a full report of the steps taken to build the project.
hproject$ cabal install
Resolving dependencies...
zombie = require('zombie'); | |
assert = require('assert'); | |
vows = require('vows'); | |
url = "http://localhost:4568/"; | |
// Load the page from localhost | |
vows.describe('The tags page').addBatch({ | |
'Presence' : { |
def is_ajax_request? | |
if respond_to? :content_type | |
if request.xhr? | |
true | |
else | |
false | |
end | |
else | |
false | |
end |
# coding: utf-8 | |
ENV['RACK_ENV'] = 'test' | |
require './nejiro' | |
require 'rspec' | |
require 'capybara' | |
require 'capybara/rspec' | |
require 'capybara-webkit' |
p@maple:/usr/local/src/camping$ git diff | |
diff --git a/Gemfile b/Gemfile | |
index b0b1ee2..aee38c4 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -9,6 +9,12 @@ if rack = ENV['RACK'] | |
end | |
end | |
+group :development do |
%%% @doc Common Test Example Common Test Hook module. | |
-module(ct_tty_hook). | |
%% @doc Add the following line in your *.spec file to enable | |
%% reasonable, tty error reporting for your common tests: | |
%% {ct_hooks, [ct_tty_hook]}. | |
%% Callbacks | |
-export([id/1]). | |
-export([init/2]). |
I just ran across unintuitive behavior in [String.strip]
When the last U8 preceding the trailing whitespace is a fragment of a utf-8 sequence,
it gets chopped off along with the following whitespace.
Whe the last U8 preceding the end of the string is a fragment of a utf-8 sequence,
that last codepoint gets mangled to its first octet.
This goes against the prinicple of least surprise. Encoding issues notwithstanding,
// This works | |
actor Router | |
let _env : Env | |
var _notifiers : Map[String val, ChatSession tag] | |
new create(env: Env) => | |
_env = env | |
_notifiers = Map[String val, ChatSession tag].create(10) | |
fun ref _user_list() : Array[String] val => |
class Maybe[A : Equatable[A] val] is Equatable[Maybe[A]] | |
let v : (A val | None) | |
new val create(thing: A) => v = thing | |
new val empty() => v = None | |
fun eq(that: box->Maybe[A]): Bool => | |
match (this.v, that.v) | |
| (let v' : A, let v'' : A) => v' == v'' | |
| (let n' : None, let n'' : None) => true |
.setup: $(wildcard deps/**) | |
@echo setting up | |
@touch .setup | |
test: .setup | |
@echo tests ran |