Skip to content

Commit

Permalink
Restore PicoLisp namespaces for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aw committed Mar 23, 2017
1 parent 79036b0 commit 1f26b55
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.0 (2017-03-23)

* Restore PicoLisp namespaces for backwards compatibility. Disable through PIL_NAMESPACES=false.

## 2.0.0 (2017-03-09)

* Remove the use of PicoLisp namespaces (functionally equivalent to 1.0.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Here are some guidelines on how to use `unit.l`, but you're free to poke around

There exists a few public functions: `(execute)`, `(report)`, and a bunch of `(assert-X)` where X is a type of assertion.

> **Note:** Namespaces can be disabled by setting the environment variable `PIL_NO_NAMESPACES=true`
> **Note:** Namespaces can be disabled by setting the environment variable `PIL_NAMESPACES=false`
> **Note for 64-bit PicoLisp:** you can use `(symbols 'unit)` (or the prefix: `unit~`). Ignored if `PIL_NO_NAMESPACES=true`
> **Note for 64-bit PicoLisp:** you can use `(symbols 'unit)` (or the prefix: `unit~`). Ignored if `PIL_NAMESPACES=false`
> **Note for 32-bit PicoLisp:** you don't have access to `(symbols)`, so these functions might clash with existing ones.
Expand Down
2 changes: 1 addition & 1 deletion reporters/default.l
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Copyright (c) 2017 Alexander Williams, Unscramble <[email protected]>

(unless (sys "PIL_NO_NAMESPACES")
(unless (= "false" (sys "PIL_NAMESPACES"))
(local *Colours print-report print-passed print-failed report-failed print-error)
(local print-expected print-got exit-gracefully) )

Expand Down
2 changes: 1 addition & 1 deletion reporters/plain.l
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Copyright (c) 2017 Alexander Williams, Unscramble <[email protected]>

(unless (sys "PIL_NO_NAMESPACES") (local print-report))
(unless (= "false" (sys "PIL_NAMESPACES")) (local print-report))

[de print-report ()
(mapcar println *Results)
Expand Down
2 changes: 1 addition & 1 deletion test.l
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env pil

(unless (sys "PIL_NO_NAMESPACES")
(unless (= "false" (sys "PIL_NAMESPACES"))
(when symbols (symbols 'unit 'pico)) )

(load "unit.l")
Expand Down
2 changes: 1 addition & 1 deletion unit.l
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Copyright (c) 2017 Alexander Williams, Unscramble <[email protected]>

(unless (sys "PIL_NO_NAMESPACES")
(unless (= "false" (sys "PIL_NAMESPACES"))
(when symbols (symbols 'unit 'pico))

(local MODULE_INFO *My_tests_are_order_dependent *Results)
Expand Down

0 comments on commit 1f26b55

Please sign in to comment.