Skip to content

Commit 79036b0

Browse files
committed
Make namespaces optional
1 parent 0a7c381 commit 79036b0

File tree

8 files changed

+24
-15
lines changed

8 files changed

+24
-15
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.0.0 (2017-03-09)
4+
5+
* Remove the use of PicoLisp namespaces (functionally equivalent to 1.0.0)
6+
37
## 1.0.0 (2015-06-09)
48

59
* Production release

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
3+
Copyright (c) 2017 Alexander Williams, Unscramble <license@unscramble.jp>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Here are some guidelines on how to use `unit.l`, but you're free to poke around
3939

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

42-
> **Note for 64-bit PicoLisp:** you can use `(symbols 'unit)` (or the prefix: `unit~`).
42+
> **Note:** Namespaces can be disabled by setting the environment variable `PIL_NO_NAMESPACES=true`
43+
44+
> **Note for 64-bit PicoLisp:** you can use `(symbols 'unit)` (or the prefix: `unit~`). Ignored if `PIL_NO_NAMESPACES=true`
4345
4446
> **Note for 32-bit PicoLisp:** you don't have access to `(symbols)`, so these functions might clash with existing ones.
4547
@@ -246,4 +248,4 @@ If you want to improve this library, please make a pull-request.
246248

247249
[MIT License](LICENSE)
248250

249-
Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
251+
Copyright (c) 2017 Alexander Williams, Unscramble <license@unscramble.jp>

module.l

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[de MODULE_INFO
22
("name" "unit")
3-
("version" "1.0.0")
3+
("version" "2.0.0")
44
("summary" "Unit Testing framework for PicoLisp")
55
("source" "https://github.com/aw/picolisp-unit.git")
66
("author" "Alexander Williams")
77
("license" "MIT")
8-
("copyright" "(c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>") ]
8+
("copyright" "(c) 2017 Alexander Williams, Unscramble <license@unscramble.jp>") ]

reporters/default.l

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#
33
# The MIT License (MIT)
44
#
5-
# Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
5+
# Copyright (c) 2017 Alexander Williams, Unscramble <license@unscramble.jp>
66

7-
(local *Colours print-report print-passed print-failed report-failed print-error)
8-
(local print-expected print-got exit-gracefully)
7+
(unless (sys "PIL_NO_NAMESPACES")
8+
(local *Colours print-report print-passed print-failed report-failed print-error)
9+
(local print-expected print-got exit-gracefully) )
910

1011
(de *Colours ("red" . 1)
1112
("green" . 2)

reporters/plain.l

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#
33
# The MIT License (MIT)
44
#
5-
# Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
5+
# Copyright (c) 2017 Alexander Williams, Unscramble <license@unscramble.jp>
66

7-
(local print-report)
7+
(unless (sys "PIL_NO_NAMESPACES") (local print-report))
88

99
[de print-report ()
1010
(mapcar println *Results)

test.l

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env pil
22

3-
(when symbols (symbols 'unit 'pico))
3+
(unless (sys "PIL_NO_NAMESPACES")
4+
(when symbols (symbols 'unit 'pico)) )
45

56
(load "unit.l")
67

unit.l

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
#
33
# The MIT License (MIT)
44
#
5-
# Copyright (c) 2015 Alexander Williams, Unscramble <license@unscramble.jp>
5+
# Copyright (c) 2017 Alexander Williams, Unscramble <license@unscramble.jp>
66

7-
(when symbols (symbols 'unit 'pico))
7+
(unless (sys "PIL_NO_NAMESPACES")
8+
(when symbols (symbols 'unit 'pico))
89

9-
(local MODULE_INFO *My_tests_are_order_dependent *Results)
10-
(local randomize passed failed queue-results colour plural? get-results)
10+
(local MODULE_INFO *My_tests_are_order_dependent *Results)
11+
(local randomize passed failed queue-results colour plural? get-results) )
1112

1213
(load (pack (car (file)) "module.l"))
1314
(load (pack (car (file)) "reporters/" (if (sys "TEST_REPORTER") @ "default") ".l"))

0 commit comments

Comments
 (0)