aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-269.js
blob: 1d41dea61b7edb71236dd790ee3769ca6e052c9d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
issue_269_1: {
	options = {unsafe: true};
	input: {
		f(
			String(x),
			Number(x),
			Boolean(x),

			String(),
			Number(),
			Boolean()
		);
	}
	expect: {
		f(
			x + '', +x, !!x,
			'', 0, false
		);
	}
}

issue_269_dangers: {
	options = {unsafe: true};
	input: {
		f(
			String(x, x),
			Number(x, x),
			Boolean(x, x)
		);
	}
	expect: {
		f(String(x, x), Number(x, x), Boolean(x, x));
	}
}

issue_269_in_scope: {
	options = {unsafe: true};
	input: {
		var String, Number, Boolean;
		f(
			String(x),
			Number(x, x),
			Boolean(x)
		);
	}
	expect: {
		var String, Number, Boolean;
		f(String(x), Number(x, x), Boolean(x));
	}
}

strings_concat: {
	options = {unsafe: true};
	input: {
		f(
			String(x + 'str'),
			String('str' + x)
		);
	}
	expect: {
		f(
			x + 'str',
			'str' + x
		);
	}
}
ers no longer need to be aware of what a given service depends on. See the discussion at <https://lists.gnu.org/archive/html/guix-devel/2018-01/msg00114.html>. * gnu/services.scm (missing-target-error): New procedure. (service-back-edges): Use it. (instantiate-missing-services): New procedure. * gnu/system.scm (operating-system-services): Call 'instantiate-missing-services'. * tests/services.scm ("instantiate-missing-services") ("instantiate-missing-services, no default value"): New tests. * gnu/services/version-control.scm (cgit-service-type)[extensions]: Add FCGIWRAP-SERVICE-TYPE. * gnu/tests/version-control.scm (%cgit-os): Remove NGINX-SERVICE-TYPE and FCGIWRAP-SERVICE-TYPE instances. * doc/guix.texi (Log Rotation): Remove 'mcron-service-type' in example. (Miscellaneous Services): Remove 'nginx-service-type' and 'fcgiwrap-service-type' in Cgit example. 2017-11-08services: Add 'lookup-service-types'.Ludovic Courtès * gnu/services.scm (lookup-service-types): New procedure. * tests/services.scm ("lookup-service-types"): New test. 2017-04-16services: Service types can now specify a default value for instances.Ludovic Courtès * gnu/services.scm (&no-default-value): New variable. (<service-type>)[default-value]: New field. (<service>): Rename constructor from 'service' to 'make-service'. (service): New macro. (%service-with-default-value): New procedure. (&missing-value-service-error): New error condition. * tests/services.scm ("services, default value"): New test. * doc/guix.texi (Service Types and Services): Document 'default-value'. (Service Reference): Explain default values. 2017-04-16services: 'service-parameters' becomes 'service-value'.Ludovic Courtès * gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly.