1 module tests.ut.dub_json;
2 
3 
4 import unit_threaded;
5 import reggae;
6 import reggae.dub.json;
7 import std.string;
8 
9 
10 immutable jsonString =
11     `WARNING: A deprecated branch based version specification is used for the dependency unit-threaded. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.` ~
12     `{` ~
13     `  "packages": [` ~
14     `    {` ~
15     `      "targetType": "executable",` ~
16     `      "path": "/path/to/pkg1",` ~
17     `      "name": "pkg1",` ~
18     `      "mainSourceFile": "src/boooo.d",` ~
19     `      "targetFileName": "super_app",` ~
20     `      "dflags": [],` ~
21     `      "lflags": ["-L$LIB_DIR1", "-L$LIB_DIR2"],` ~
22     `      "versions": ["v1", "v2"],` ~
23     `      "dependencies": ["pkg_other"],` ~
24     `      "importPaths": ["leimports"],` ~
25     `      "stringImportPaths": [` ~
26     `        "src/string_imports",` ~
27     `        "src/moar_stringies"` ~
28     `      ],` ~
29     `      "active": true,` ~
30     `      "preBuildCommands": ["dub run dtest"],` ~
31     `      "files": [` ~
32     `        {` ~
33     `          "path": "src/foo.d",` ~
34     `          "type": "source"` ~
35     `        },` ~
36     `        {` ~
37     `          "path": "src/bar.d",` ~
38     `          "type": "source"` ~
39     `        },` ~
40     `        {` ~
41     `          "path": "src/boooo.d",` ~
42     `          "type": "source"` ~
43     `        }` ~
44     `      ]` ~
45     `    },` ~
46     `    {` ~
47     `      "path": "/weird/path/pkg_other",` ~
48     `      "name": "pkg_other",` ~
49     `      "importPaths": [` ~
50     `        "my_imports",` ~
51     `        "moar_imports"` ~
52     `      ],` ~
53     `      "dflags": [` ~
54     `        "-g", "-debug"` ~
55     `      ],` ~
56     `      "lflags": [],` ~
57     `      "libs": ["liblib", "otherlib"],` ~
58     `      "versions": ["v3", "v4"],` ~
59     `      "stringImportPaths": [],` ~
60     `      "active": true,` ~
61     `      "files": [` ~
62     `        {` ~
63     `          "path": "source/toto.d",` ~
64     `          "type": "source"` ~
65     `        },` ~
66     `        {` ~
67     `          "path": "source/africa.d",` ~
68     `          "type": "source"` ~
69     `        },` ~
70     `        {` ~
71     `          "path": "source/africa.d",` ~
72     `          "type": "weirdo"` ~
73     `        }` ~
74     `      ]` ~
75     `    }` ~
76     `  ]` ~
77     `}`;
78 
79 
80 void testJsonToDubDescribe() {
81     auto info = getDubInfo(jsonString.dup);
82     info.shouldEqual(
83         DubInfo(
84             [DubPackage("pkg1", "/path/to/pkg1", "src/boooo.d", "super_app",
85                         [],
86                         ["-L$LIB_DIR1", "-L$LIB_DIR2"],
87                         ["leimports"],
88                         ["src/string_imports", "src/moar_stringies"],
89                         ["src/foo.d", "src/bar.d", "src/boooo.d"],
90                         "executable", ["v1", "v2"], ["pkg_other"], [], true, ["dub run dtest"]),
91 
92              DubPackage("pkg_other", "/weird/path/pkg_other", "", "",
93                         ["-g", "-debug"],
94                         [],
95                         ["my_imports", "moar_imports"],
96                         [],
97                         ["source/toto.d", "source/africa.d"],
98                         "", ["v3", "v4"], [], ["liblib", "otherlib"], true)]));
99 }
100 
101 @("DubInfo.toTargets with -unittest")
102 unittest {
103     import reggae.config: setOptions, options;
104     import reggae.options: getOptions;
105 
106     auto oldOptions = options;
107     scope(exit) setOptions(oldOptions);
108     setOptions(getOptions(["reggae", "--per_module", "/tmp/proj"]));
109 
110     auto info = getDubInfo(jsonString.dup);
111     info.toTargets(Yes.main, "-unittest")[0].shouldEqual(
112         Target("path/to/pkg1/src/foo.o",
113                Command(CommandType.compile,
114                        assocListT("includes", ["-I/path/to/pkg1/leimports",
115                                                "-I/weird/path/pkg_other/my_imports",
116                                                "-I/weird/path/pkg_other/moar_imports",
117                                                "-I/tmp/proj"],
118                                   "flags", ["-version=v1", "-version=v2", "-version=v3", "-version=v4", "-unittest"],
119                                   "stringImports", ["-J/path/to/pkg1/src/string_imports",
120                                                     "-J/path/to/pkg1/src/moar_stringies"],
121                                   "DEPFILE", ["path/to/pkg1/src/foo.o.dep"])),
122                Target("/path/to/pkg1/src/foo.d")),
123     );
124 
125     info.toTargets(Yes.main, "-unittest")[3].shouldEqual(
126         Target("weird/path/pkg_other/source/toto.o",
127                Command(CommandType.compile,
128                        assocListT("includes", ["-I/path/to/pkg1/leimports",
129                                                "-I/weird/path/pkg_other/my_imports",
130                                                "-I/weird/path/pkg_other/moar_imports",
131                                                "-I/tmp/proj"],
132                                   "flags", ["-g", "-debug", "-version=v1", "-version=v2", "-version=v3", "-version=v4"],
133                                   "stringImports", cast(string[])[],
134                                   "DEPFILE", ["weird/path/pkg_other/source/toto.o.dep"])),
135                Target("/weird/path/pkg_other/source/toto.d")),
136     );
137 }
138 
139 void testDubInfoToTargets() {
140     import reggae.config: setOptions, options;
141     import reggae.options: getOptions;
142 
143     auto oldOptions = options;
144     scope(exit) setOptions(oldOptions);
145 
146     setOptions(getOptions(["reggae", "--per_module", "/tmp/proj"]));
147 
148     auto info = getDubInfo(jsonString.dup);
149     info.toTargets[0].shouldEqual(
150         Target("path/to/pkg1/src/foo.o",
151                Command(CommandType.compile,
152                        assocListT("includes", ["-I/path/to/pkg1/leimports",
153                                                "-I/weird/path/pkg_other/my_imports",
154                                                "-I/weird/path/pkg_other/moar_imports",
155                                                "-I/tmp/proj"],
156                                   "flags", ["-version=v1", "-version=v2", "-version=v3", "-version=v4"],
157                                   "stringImports", ["-J/path/to/pkg1/src/string_imports",
158                                                     "-J/path/to/pkg1/src/moar_stringies"],
159                                   "DEPFILE", ["path/to/pkg1/src/foo.o.dep"])),
160                Target("/path/to/pkg1/src/foo.d")),
161     );
162     info.toTargets[2].shouldEqual(
163         Target("path/to/pkg1/src/boooo.o",
164                Command(CommandType.compile,
165                        assocListT("includes", ["-I/path/to/pkg1/leimports",
166                                                "-I/weird/path/pkg_other/my_imports",
167                                                "-I/weird/path/pkg_other/moar_imports",
168                                                "-I/tmp/proj"],
169                                   "flags", ["-version=v1", "-version=v2", "-version=v3", "-version=v4"],
170                                   "stringImports", ["-J/path/to/pkg1/src/string_imports",
171                                                     "-J/path/to/pkg1/src/moar_stringies"],
172                                   "DEPFILE", ["path/to/pkg1/src/boooo.o.dep"])),
173                Target("/path/to/pkg1/src/boooo.d")),
174         );
175 
176     info.toTargets(No.main)[2].shouldEqual(
177         Target("weird/path/pkg_other/source/toto.o",
178                Command(CommandType.compile,
179                        assocListT("includes", ["-I/path/to/pkg1/leimports",
180                                                "-I/weird/path/pkg_other/my_imports",
181                                                "-I/weird/path/pkg_other/moar_imports",
182                                                "-I/tmp/proj"],
183                                   "flags", ["-g", "-debug", "-version=v1", "-version=v2", "-version=v3", "-version=v4"],
184                                   "stringImports", cast(string[])[],
185                                   "DEPFILE", ["weird/path/pkg_other/source/toto.o.dep"])),
186                Target("/weird/path/pkg_other/source/toto.d")),
187 
188         );
189 
190 }
191 
192 
193 @("dub describe with empty sources")
194 unittest {
195     auto jsonString = `
196 Configuration 'library' of package test contains no source files. Please add {"targetType": "none"} to it's package description to avoid building it.
197 {
198         "rootPackage": "test",
199         "mainPackage": "test",
200         "configuration": "library",
201         "buildType": "debug",
202         "compiler": "dmd",
203         "architecture": [
204                 "x86_64"
205         ],
206         "platform": [
207                 "linux",
208                 "posix"
209         ],
210         "packages": [
211                 {
212                         "path": "/tmp/test/",
213                         "name": "test",
214                         "version": "~master",
215                         "description": "A minimal D application.",
216                         "homepage": "",
217                         "authors": [
218                                 "atila"
219                         ],
220                         "copyright": "Copyright © 2016, atila",
221                         "license": "",
222                         "dependencies": [],
223                         "active": true,
224                         "configuration": "library",
225                         "targetType": "library",
226                         "targetPath": "",
227                         "targetName": "test",
228                         "targetFileName": "libtest.a",
229                         "workingDirectory": "",
230                         "mainSourceFile": "",
231                         "dflags": [],
232                         "lflags": [],
233                         "libs": [],
234                         "copyFiles": [],
235                         "versions": [],
236                         "debugVersions": [],
237                         "importPaths": [
238                                 "source/"
239                         ],
240                         "stringImportPaths": [],
241                         "preGenerateCommands": [],
242                         "postGenerateCommands": [],
243                         "preBuildCommands": [],
244                         "postBuildCommands": [],
245                         "buildRequirements": [],
246                         "options": [],
247                         "files": []
248                 }
249         ],
250         "targets": []
251 }
252         `;
253     getDubInfo(jsonString);
254 }
255 
256 
257 immutable travisString = `
258 {
259 
260 	"rootPackage": "reggae",
261 
262 	"configuration": "executable",
263 
264 	"buildType": "debug",
265 
266 	"compiler": "dmd",
267 
268 	"architecture": [
269 
270 		"x86_64"
271 
272 	],
273 
274 	"platform": [
275 
276 		"linux",
277 
278 		"posix"
279 
280 	],
281 
282 	"packages": [
283 
284 		{
285 
286 			"path": "/home/travis/build/atilaneves/reggae/",
287 
288 			"name": "reggae",
289 
290 			"version": "~master",
291 
292 			"description": "A build system in D",
293 
294 			"homepage": "https://github.com/atilaneves/reggae",
295 
296 			"authors": [
297 
298 				"Atila Neves"
299 
300 			],
301 
302 			"copyright": "Copyright © 2015, Atila Neves",
303 
304 			"license": "BSD 3-clause",
305 
306 			"dependencies": [],
307 
308 			"active": true,
309 
310 			"configuration": "executable",
311 
312 			"targetType": "executable",
313 
314 			"targetPath": "bin",
315 
316 			"targetName": "reggae",
317 
318 			"targetFileName": "reggae",
319 
320 			"workingDirectory": "",
321 
322 			"mainSourceFile": "src/reggae/reggae_main.d",
323 
324 			"dflags": [],
325 
326 			"lflags": [],
327 
328 			"libs": [],
329 
330 			"copyFiles": [],
331 
332 			"versions": [],
333 
334 			"debugVersions": [],
335 
336 			"importPaths": [
337 
338 				"src",
339 
340 				"payload"
341 
342 			],
343 
344 			"stringImportPaths": [
345 
346 				"payload/reggae"
347 
348 			],
349 
350 			"preGenerateCommands": [],
351 
352 			"postGenerateCommands": [],
353 
354 			"preBuildCommands": [],
355 
356 			"postBuildCommands": [],
357 
358 			"buildRequirements": [],
359 
360 			"options": [],
361 
362 			"files": [
363 
364 				{
365 
366 					"role": "unusedSource",
367 
368 					"path": "bin/ut.d"
369 
370 				},
371 
372 				{
373 
374 					"role": "stringImport",
375 
376 					"path": "payload/reggae/JSON.lua"
377 
378 				},
379 
380 				{
381 
382 					"role": "stringImport",
383 
384 					"path": "payload/reggae/__init__.py"
385 
386 				},
387 
388 				{
389 
390 					"role": "source",
391 
392 					"path": "payload/reggae/backend/binary.d"
393 
394 				},
395 
396 				{
397 
398 					"role": "source",
399 
400 					"path": "payload/reggae/backend/make.d"
401 
402 				},
403 
404 				{
405 
406 					"role": "source",
407 
408 					"path": "payload/reggae/backend/ninja.d"
409 
410 				},
411 
412 				{
413 
414 					"role": "source",
415 
416 					"path": "payload/reggae/backend/package.d"
417 
418 				},
419 
420 				{
421 
422 					"role": "source",
423 
424 					"path": "payload/reggae/backend/tup.d"
425 
426 				},
427 
428 				{
429 
430 					"role": "source",
431 
432 					"path": "payload/reggae/build.d"
433 
434 				},
435 
436 				{
437 
438 					"role": "stringImport",
439 
440 					"path": "payload/reggae/build.py"
441 
442 				},
443 
444 				{
445 
446 					"role": "source",
447 
448 					"path": "payload/reggae/buildgen.d"
449 
450 				},
451 
452 				{
453 
454 					"role": "stringImport",
455 
456 					"path": "payload/reggae/buildgen_main.d"
457 
458 				},
459 
460 				{
461 
462 					"role": "source",
463 
464 					"path": "payload/reggae/config.d"
465 
466 				},
467 
468 				{
469 
470 					"role": "source",
471 
472 					"path": "payload/reggae/core/package.d"
473 
474 				},
475 
476 				{
477 
478 					"role": "source",
479 
480 					"path": "payload/reggae/core/rules/package.d"
481 
482 				},
483 
484 				{
485 
486 					"role": "source",
487 
488 					"path": "payload/reggae/ctaa.d"
489 
490 				},
491 
492 				{
493 
494 					"role": "stringImport",
495 
496 					"path": "payload/reggae/dcompile.d"
497 
498 				},
499 
500 				{
501 
502 					"role": "source",
503 
504 					"path": "payload/reggae/dependencies.d"
505 
506 				},
507 
508 				{
509 
510 					"role": "source",
511 
512 					"path": "payload/reggae/dub/info.d"
513 
514 				},
515 
516 				{
517 
518 					"role": "source",
519 
520 					"path": "payload/reggae/file.d"
521 
522 				},
523 
524 				{
525 
526 					"role": "source",
527 
528 					"path": "payload/reggae/options.d"
529 
530 				},
531 
532 				{
533 
534 					"role": "source",
535 
536 					"path": "payload/reggae/package.d"
537 
538 				},
539 
540 				{
541 
542 					"role": "source",
543 
544 					"path": "payload/reggae/range.d"
545 
546 				},
547 
548 				{
549 
550 					"role": "source",
551 
552 					"path": "payload/reggae/reflect.d"
553 
554 				},
555 
556 				{
557 
558 					"role": "stringImport",
559 
560 					"path": "payload/reggae/reflect.py"
561 
562 				},
563 
564 				{
565 
566 					"role": "stringImport",
567 
568 					"path": "payload/reggae/reggae-js.js"
569 
570 				},
571 
572 				{
573 
574 					"role": "stringImport",
575 
576 					"path": "payload/reggae/reggae.lua"
577 
578 				},
579 
580 				{
581 
582 					"role": "stringImport",
583 
584 					"path": "payload/reggae/reggae.rb"
585 
586 				},
587 
588 				{
589 
590 					"role": "stringImport",
591 
592 					"path": "payload/reggae/reggae_json_build.js"
593 
594 				},
595 
596 				{
597 
598 					"role": "stringImport",
599 
600 					"path": "payload/reggae/reggae_json_build.lua"
601 
602 				},
603 
604 				{
605 
606 					"role": "stringImport",
607 
608 					"path": "payload/reggae/reggae_json_build.py"
609 
610 				},
611 
612 				{
613 
614 					"role": "stringImport",
615 
616 					"path": "payload/reggae/reggae_json_build.rb"
617 
618 				},
619 
620 				{
621 
622 					"role": "stringImport",
623 
624 					"path": "payload/reggae/rules.py"
625 
626 				},
627 
628 				{
629 
630 					"role": "source",
631 
632 					"path": "payload/reggae/rules/c_and_cpp.d"
633 
634 				},
635 
636 				{
637 
638 					"role": "source",
639 
640 					"path": "payload/reggae/rules/common.d"
641 
642 				},
643 
644 				{
645 
646 					"role": "source",
647 
648 					"path": "payload/reggae/rules/d.d"
649 
650 				},
651 
652 				{
653 
654 					"role": "source",
655 
656 					"path": "payload/reggae/rules/dub.d"
657 
658 				},
659 
660 				{
661 
662 					"role": "source",
663 
664 					"path": "payload/reggae/rules/package.d"
665 
666 				},
667 
668 				{
669 
670 					"role": "source",
671 
672 					"path": "payload/reggae/sorting.d"
673 
674 				},
675 
676 				{
677 
678 					"role": "source",
679 
680 					"path": "payload/reggae/types.d"
681 
682 				},
683 
684 				{
685 
686 					"role": "source",
687 
688 					"path": "src/reggae/dub/call.d"
689 
690 				},
691 
692 				{
693 
694 					"role": "source",
695 
696 					"path": "src/reggae/dub/interop.d"
697 
698 				},
699 
700 				{
701 
702 					"role": "source",
703 
704 					"path": "src/reggae/dub/json.d"
705 
706 				},
707 
708 				{
709 
710 					"role": "source",
711 
712 					"path": "src/reggae/json_build.d"
713 
714 				},
715 
716 				{
717 
718 					"role": "source",
719 
720 					"path": "src/reggae/reggae.d"
721 
722 				},
723 
724 				{
725 
726 					"role": "source",
727 
728 					"path": "src/reggae/reggae_main.d"
729 
730 				},
731 
732 				{
733 
734 					"role": "unusedSource",
735 
736 					"path": "tests/it/backend/binary.d"
737 
738 				},
739 
740 				{
741 
742 					"role": "unusedSource",
743 
744 					"path": "tests/it/buildgen/arbitrary.d"
745 
746 				},
747 
748 				{
749 
750 					"role": "unusedSource",
751 
752 					"path": "tests/it/buildgen/automatic_dependency.d"
753 
754 				},
755 
756 				{
757 
758 					"role": "unusedSource",
759 
760 					"path": "tests/it/buildgen/backend_errors.d"
761 
762 				},
763 
764 				{
765 
766 					"role": "unusedSource",
767 
768 					"path": "tests/it/buildgen/code_command.d"
769 
770 				},
771 
772 				{
773 
774 					"role": "unusedSource",
775 
776 					"path": "tests/it/buildgen/empty_reggaefile.d"
777 
778 				},
779 
780 				{
781 
782 					"role": "unusedSource",
783 
784 					"path": "tests/it/buildgen/export_.d"
785 
786 				},
787 
788 				{
789 
790 					"role": "unusedSource",
791 
792 					"path": "tests/it/buildgen/implicits.d"
793 
794 				},
795 
796 				{
797 
798 					"role": "unusedSource",
799 
800 					"path": "tests/it/buildgen/multiple_outputs.d"
801 
802 				},
803 
804 				{
805 
806 					"role": "unusedSource",
807 
808 					"path": "tests/it/buildgen/optional.d"
809 
810 				},
811 
812 				{
813 
814 					"role": "unusedSource",
815 
816 					"path": "tests/it/buildgen/outputs_in_project_path.d"
817 
818 				},
819 
820 				{
821 
822 					"role": "unusedSource",
823 
824 					"path": "tests/it/buildgen/package.d"
825 
826 				},
827 
828 				{
829 
830 					"role": "unusedSource",
831 
832 					"path": "tests/it/buildgen/phony.d"
833 
834 				},
835 
836 				{
837 
838 					"role": "unusedSource",
839 
840 					"path": "tests/it/buildgen/reggaefile_errors.d"
841 
842 				},
843 
844 				{
845 
846 					"role": "unusedSource",
847 
848 					"path": "tests/it/buildgen/two_builds_reggaefile.d"
849 
850 				},
851 
852 				{
853 
854 					"role": "unusedSource",
855 
856 					"path": "tests/it/package.d"
857 
858 				},
859 
860 				{
861 
862 					"role": "unusedSource",
863 
864 					"path": "tests/it/rules/json_build.d"
865 
866 				},
867 
868 				{
869 
870 					"role": "unusedSource",
871 
872 					"path": "tests/it/rules/object_files.d"
873 
874 				},
875 
876 				{
877 
878 					"role": "unusedSource",
879 
880 					"path": "tests/it/rules/scriptlike.d"
881 
882 				},
883 
884 				{
885 
886 					"role": "unusedSource",
887 
888 					"path": "tests/it/rules/static_lib.d"
889 
890 				},
891 
892 				{
893 
894 					"role": "unusedSource",
895 
896 					"path": "tests/it/rules/unity_build.d"
897 
898 				},
899 
900 				{
901 
902 					"role": "unusedSource",
903 
904 					"path": "tests/it/runtime/dub.d"
905 
906 				},
907 
908 				{
909 
910 					"role": "unusedSource",
911 
912 					"path": "tests/it/runtime/error_messages.d"
913 
914 				},
915 
916 				{
917 
918 					"role": "unusedSource",
919 
920 					"path": "tests/it/runtime/javascript.d"
921 
922 				},
923 
924 				{
925 
926 					"role": "unusedSource",
927 
928 					"path": "tests/it/runtime/lua.d"
929 
930 				},
931 
932 				{
933 
934 					"role": "unusedSource",
935 
936 					"path": "tests/it/runtime/package.d"
937 
938 				},
939 
940 				{
941 
942 					"role": "unusedSource",
943 
944 					"path": "tests/it/runtime/python.d"
945 
946 				},
947 
948 				{
949 
950 					"role": "unusedSource",
951 
952 					"path": "tests/it/runtime/regressions.d"
953 
954 				},
955 
956 				{
957 
958 					"role": "unusedSource",
959 
960 					"path": "tests/it/runtime/ruby.d"
961 
962 				},
963 
964 				{
965 
966 					"role": "unusedSource",
967 
968 					"path": "tests/it/runtime/user_vars.d"
969 
970 				},
971 
972 				{
973 
974 					"role": "unusedSource",
975 
976 					"path": "tests/projects/d_and_cpp/reggaefile.d"
977 
978 				},
979 
980 				{
981 
982 					"role": "unusedSource",
983 
984 					"path": "tests/projects/d_and_cpp/src/constants.d"
985 
986 				},
987 
988 				{
989 
990 					"role": "unusedSource",
991 
992 					"path": "tests/projects/dub/imps/strings.d"
993 
994 				},
995 
996 				{
997 
998 					"role": "unusedSource",
999 
1000 					"path": "tests/projects/dub_prebuild/source/lemaths.d"
1001 
1002 				},
1003 
1004 				{
1005 
1006 					"role": "unusedSource",
1007 
1008 					"path": "tests/projects/export_proj/reggaefile.d"
1009 
1010 				},
1011 
1012 				{
1013 
1014 					"role": "unusedSource",
1015 
1016 					"path": "tests/projects/implicits/reggaefile.d"
1017 
1018 				},
1019 
1020 				{
1021 
1022 					"role": "unusedSource",
1023 
1024 					"path": "tests/projects/multiple_outputs/protocol.d"
1025 
1026 				},
1027 
1028 				{
1029 
1030 					"role": "unusedSource",
1031 
1032 					"path": "tests/projects/multiple_outputs/reggaefile_sep.d"
1033 
1034 				},
1035 
1036 				{
1037 
1038 					"role": "unusedSource",
1039 
1040 					"path": "tests/projects/multiple_outputs/reggaefile_tog.d"
1041 
1042 				},
1043 
1044 				{
1045 
1046 					"role": "unusedSource",
1047 
1048 					"path": "tests/projects/opt/reggaefile.d"
1049 
1050 				},
1051 
1052 				{
1053 
1054 					"role": "unusedSource",
1055 
1056 					"path": "tests/projects/outputs_in_project_path/reggaefile.d"
1057 
1058 				},
1059 
1060 				{
1061 
1062 					"role": "unusedSource",
1063 
1064 					"path": "tests/projects/phony_proj/reggaefile.d"
1065 
1066 				},
1067 
1068 				{
1069 
1070 					"role": "unusedSource",
1071 
1072 					"path": "tests/projects/project1/reggaefile.d"
1073 
1074 				},
1075 
1076 				{
1077 
1078 					"role": "unusedSource",
1079 
1080 					"path": "tests/projects/project1/src/maths.d"
1081 
1082 				},
1083 
1084 				{
1085 
1086 					"role": "unusedSource",
1087 
1088 					"path": "tests/projects/project2/reggaefile.d"
1089 
1090 				},
1091 
1092 				{
1093 
1094 					"role": "unusedSource",
1095 
1096 					"path": "tests/projects/project2/source/foo.d"
1097 
1098 				},
1099 
1100 				{
1101 
1102 					"role": "unusedSource",
1103 
1104 					"path": "tests/projects/scriptlike/d/constants.d"
1105 
1106 				},
1107 
1108 				{
1109 
1110 					"role": "unusedSource",
1111 
1112 					"path": "tests/projects/scriptlike/d/logger.d"
1113 
1114 				},
1115 
1116 				{
1117 
1118 					"role": "unusedSource",
1119 
1120 					"path": "tests/projects/scriptlike/reggaefile.d"
1121 
1122 				},
1123 
1124 				{
1125 
1126 					"role": "unusedSource",
1127 
1128 					"path": "tests/projects/static_lib/libsrc/adder.d"
1129 
1130 				},
1131 
1132 				{
1133 
1134 					"role": "unusedSource",
1135 
1136 					"path": "tests/projects/static_lib/libsrc/muler.d"
1137 
1138 				},
1139 
1140 				{
1141 
1142 					"role": "unusedSource",
1143 
1144 					"path": "tests/projects/static_lib/reggaefile.d"
1145 
1146 				},
1147 
1148 				{
1149 
1150 					"role": "unusedSource",
1151 
1152 					"path": "tests/projects/template_rules/reggaefile.d"
1153 
1154 				},
1155 
1156 				{
1157 
1158 					"role": "unusedSource",
1159 
1160 					"path": "tests/projects/unity/reggaefile.d"
1161 
1162 				},
1163 
1164 				{
1165 
1166 					"role": "unusedSource",
1167 
1168 					"path": "tests/ut/backend/binary.d"
1169 
1170 				},
1171 
1172 				{
1173 
1174 					"role": "unusedSource",
1175 
1176 					"path": "tests/ut/build.d"
1177 
1178 				},
1179 
1180 				{
1181 
1182 					"role": "unusedSource",
1183 
1184 					"path": "tests/ut/by_package.d"
1185 
1186 				},
1187 
1188 				{
1189 
1190 					"role": "unusedSource",
1191 
1192 					"path": "tests/ut/code_command.d"
1193 
1194 				},
1195 
1196 				{
1197 
1198 					"role": "unusedSource",
1199 
1200 					"path": "tests/ut/cpprules.d"
1201 
1202 				},
1203 
1204 				{
1205 
1206 					"role": "unusedSource",
1207 
1208 					"path": "tests/ut/ctaa.d"
1209 
1210 				},
1211 
1212 				{
1213 
1214 					"role": "unusedSource",
1215 
1216 					"path": "tests/ut/default_options.d"
1217 
1218 				},
1219 
1220 				{
1221 
1222 					"role": "unusedSource",
1223 
1224 					"path": "tests/ut/default_rules.d"
1225 
1226 				},
1227 
1228 				{
1229 
1230 					"role": "unusedSource",
1231 
1232 					"path": "tests/ut/dependencies.d"
1233 
1234 				},
1235 
1236 				{
1237 
1238 					"role": "unusedSource",
1239 
1240 					"path": "tests/ut/drules.d"
1241 
1242 				},
1243 
1244 				{
1245 
1246 					"role": "unusedSource",
1247 
1248 					"path": "tests/ut/dub_call.d"
1249 
1250 				},
1251 
1252 				{
1253 
1254 					"role": "unusedSource",
1255 
1256 					"path": "tests/ut/dub_json.d"
1257 
1258 				},
1259 
1260 				{
1261 
1262 					"role": "unusedSource",
1263 
1264 					"path": "tests/ut/high_rules.d"
1265 
1266 				},
1267 
1268 				{
1269 
1270 					"role": "unusedSource",
1271 
1272 					"path": "tests/ut/json_build/rules.d"
1273 
1274 				},
1275 
1276 				{
1277 
1278 					"role": "unusedSource",
1279 
1280 					"path": "tests/ut/json_build/simple.d"
1281 
1282 				},
1283 
1284 				{
1285 
1286 					"role": "unusedSource",
1287 
1288 					"path": "tests/ut/ninja.d"
1289 
1290 				},
1291 
1292 				{
1293 
1294 					"role": "unusedSource",
1295 
1296 					"path": "tests/ut/range.d"
1297 
1298 				},
1299 
1300 				{
1301 
1302 					"role": "unusedSource",
1303 
1304 					"path": "tests/ut/realistic_build.d"
1305 
1306 				},
1307 
1308 				{
1309 
1310 					"role": "unusedSource",
1311 
1312 					"path": "tests/ut/reflect.d"
1313 
1314 				},
1315 
1316 				{
1317 
1318 					"role": "unusedSource",
1319 
1320 					"path": "tests/ut/rules/link.d"
1321 
1322 				},
1323 
1324 				{
1325 
1326 					"role": "unusedSource",
1327 
1328 					"path": "tests/ut/serialisation.d"
1329 
1330 				},
1331 
1332 				{
1333 
1334 					"role": "unusedSource",
1335 
1336 					"path": "tests/ut/simple_bar_reggaefile.d"
1337 
1338 				},
1339 
1340 				{
1341 
1342 					"role": "unusedSource",
1343 
1344 					"path": "tests/ut/simple_foo_reggaefile.d"
1345 
1346 				},
1347 
1348 				{
1349 
1350 					"role": "unusedSource",
1351 
1352 					"path": "tests/ut/tup.d"
1353 
1354 				},
1355 
1356 				{
1357 
1358 					"role": "unusedSource",
1359 
1360 					"path": "tests/utils.d"
1361 
1362 				}
1363 
1364 			]
1365 
1366 		},
1367 
1368 		{
1369 
1370 			"path": "/home/travis/.dub/packages/unit-threaded-0.6.14/unit-threaded/",
1371 
1372 			"name": "unit-threaded",
1373 
1374 			"version": "0.6.14",
1375 
1376 			"description": "Advanced multi-threaded unit testing framework with minimal to no boilerplate using built-in unittest blocks",
1377 
1378 			"homepage": "https://github.com/atilaneves/unit-threaded",
1379 
1380 			"authors": [
1381 
1382 				"Atila Neves"
1383 
1384 			],
1385 
1386 			"copyright": "Copyright © 2013, Atila Neves",
1387 
1388 			"license": "BSD 3-clause",
1389 
1390 			"dependencies": [],
1391 
1392 			"active": false,
1393 
1394 			"configuration": "library",
1395 
1396 			"targetType": "library",
1397 
1398 			"targetPath": "",
1399 
1400 			"targetName": "unit-threaded",
1401 
1402 			"targetFileName": "libunit-threaded.a",
1403 
1404 			"workingDirectory": "",
1405 
1406 			"mainSourceFile": "",
1407 
1408 			"dflags": [],
1409 
1410 			"lflags": [],
1411 
1412 			"libs": [],
1413 
1414 			"copyFiles": [],
1415 
1416 			"versions": [],
1417 
1418 			"debugVersions": [],
1419 
1420 			"importPaths": [
1421 
1422 				"source/"
1423 
1424 			],
1425 
1426 			"stringImportPaths": [],
1427 
1428 			"preGenerateCommands": [],
1429 
1430 			"postGenerateCommands": [],
1431 
1432 			"preBuildCommands": [],
1433 
1434 			"postBuildCommands": [],
1435 
1436 			"buildRequirements": [],
1437 
1438 			"options": [],
1439 
1440 			"files": [
1441 
1442 				{
1443 
1444 					"role": "unusedSource",
1445 
1446 					"path": "example/example_pass.d"
1447 
1448 				},
1449 
1450 				{
1451 
1452 					"role": "unusedSource",
1453 
1454 					"path": "gen/gen_ut_main.d"
1455 
1456 				},
1457 
1458 				{
1459 
1460 					"role": "source",
1461 
1462 					"path": "source/unit_threaded/asserts.d"
1463 
1464 				},
1465 
1466 				{
1467 
1468 					"role": "source",
1469 
1470 					"path": "source/unit_threaded/attrs.d"
1471 
1472 				},
1473 
1474 				{
1475 
1476 					"role": "source",
1477 
1478 					"path": "source/unit_threaded/dub.d"
1479 
1480 				},
1481 
1482 				{
1483 
1484 					"role": "source",
1485 
1486 					"path": "source/unit_threaded/factory.d"
1487 
1488 				},
1489 
1490 				{
1491 
1492 					"role": "source",
1493 
1494 					"path": "source/unit_threaded/integration.d"
1495 
1496 				},
1497 
1498 				{
1499 
1500 					"role": "source",
1501 
1502 					"path": "source/unit_threaded/io.d"
1503 
1504 				},
1505 
1506 				{
1507 
1508 					"role": "source",
1509 
1510 					"path": "source/unit_threaded/meta.d"
1511 
1512 				},
1513 
1514 				{
1515 
1516 					"role": "source",
1517 
1518 					"path": "source/unit_threaded/options.d"
1519 
1520 				},
1521 
1522 				{
1523 
1524 					"role": "source",
1525 
1526 					"path": "source/unit_threaded/package.d"
1527 
1528 				},
1529 
1530 				{
1531 
1532 					"role": "source",
1533 
1534 					"path": "source/unit_threaded/reflection.d"
1535 
1536 				},
1537 
1538 				{
1539 
1540 					"role": "source",
1541 
1542 					"path": "source/unit_threaded/runner.d"
1543 
1544 				},
1545 
1546 				{
1547 
1548 					"role": "source",
1549 
1550 					"path": "source/unit_threaded/runtime.d"
1551 
1552 				},
1553 
1554 				{
1555 
1556 					"role": "source",
1557 
1558 					"path": "source/unit_threaded/should.d"
1559 
1560 				},
1561 
1562 				{
1563 
1564 					"role": "source",
1565 
1566 					"path": "source/unit_threaded/testcase.d"
1567 
1568 				},
1569 
1570 				{
1571 
1572 					"role": "source",
1573 
1574 					"path": "source/unit_threaded/tests/module_with_attrs.d"
1575 
1576 				},
1577 
1578 				{
1579 
1580 					"role": "source",
1581 
1582 					"path": "source/unit_threaded/tests/module_with_tests.d"
1583 
1584 				},
1585 
1586 				{
1587 
1588 					"role": "source",
1589 
1590 					"path": "source/unit_threaded/tests/parametrized.d"
1591 
1592 				},
1593 
1594 				{
1595 
1596 					"role": "source",
1597 
1598 					"path": "source/unit_threaded/tests/tags.d"
1599 
1600 				},
1601 
1602 				{
1603 
1604 					"role": "source",
1605 
1606 					"path": "source/unit_threaded/testsuite.d"
1607 
1608 				},
1609 
1610 				{
1611 
1612 					"role": "source",
1613 
1614 					"path": "source/unit_threaded/uda.d"
1615 
1616 				},
1617 
1618 				{
1619 
1620 					"role": "unusedSource",
1621 
1622 					"path": "tests/pass/attributes.d"
1623 
1624 				},
1625 
1626 				{
1627 
1628 					"role": "unusedSource",
1629 
1630 					"path": "tests/pass/delayed.d"
1631 
1632 				},
1633 
1634 				{
1635 
1636 					"role": "unusedSource",
1637 
1638 					"path": "tests/pass/fixtures.d"
1639 
1640 				},
1641 
1642 				{
1643 
1644 					"role": "unusedSource",
1645 
1646 					"path": "tests/pass/io.d"
1647 
1648 				},
1649 
1650 				{
1651 
1652 					"role": "unusedSource",
1653 
1654 					"path": "tests/pass/normal.d"
1655 
1656 				},
1657 
1658 				{
1659 
1660 					"role": "unusedSource",
1661 
1662 					"path": "tests/pass/register.d"
1663 
1664 				}
1665 
1666 			]
1667 
1668 		}
1669 
1670 	],
1671 
1672 	"targets": [
1673 
1674 		{
1675 
1676 			"rootPackage": "reggae",
1677 
1678 			"packages": [
1679 
1680 				"reggae"
1681 
1682 			],
1683 
1684 			"rootConfiguration": "executable",
1685 
1686 			"buildSettings": {
1687 
1688 				"targetType": 2,
1689 
1690 				"targetPath": "/home/travis/build/atilaneves/reggae/bin",
1691 
1692 				"targetName": "reggae",
1693 
1694 				"workingDirectory": "",
1695 
1696 				"mainSourceFile": "/home/travis/build/atilaneves/reggae/src/reggae/reggae_main.d",
1697 
1698 				"dflags": [],
1699 
1700 				"lflags": [],
1701 
1702 				"libs": [],
1703 
1704 				"linkerFiles": [],
1705 
1706 				"sourceFiles": [
1707 
1708 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/binary.d",
1709 
1710 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/make.d",
1711 
1712 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/ninja.d",
1713 
1714 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/package.d",
1715 
1716 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/tup.d",
1717 
1718 					"/home/travis/build/atilaneves/reggae/payload/reggae/build.d",
1719 
1720 					"/home/travis/build/atilaneves/reggae/payload/reggae/buildgen.d",
1721 
1722 					"/home/travis/build/atilaneves/reggae/payload/reggae/config.d",
1723 
1724 					"/home/travis/build/atilaneves/reggae/payload/reggae/core/package.d",
1725 
1726 					"/home/travis/build/atilaneves/reggae/payload/reggae/core/rules/package.d",
1727 
1728 					"/home/travis/build/atilaneves/reggae/payload/reggae/ctaa.d",
1729 
1730 					"/home/travis/build/atilaneves/reggae/payload/reggae/dependencies.d",
1731 
1732 					"/home/travis/build/atilaneves/reggae/payload/reggae/dub/info.d",
1733 
1734 					"/home/travis/build/atilaneves/reggae/payload/reggae/file.d",
1735 
1736 					"/home/travis/build/atilaneves/reggae/payload/reggae/options.d",
1737 
1738 					"/home/travis/build/atilaneves/reggae/payload/reggae/package.d",
1739 
1740 					"/home/travis/build/atilaneves/reggae/payload/reggae/range.d",
1741 
1742 					"/home/travis/build/atilaneves/reggae/payload/reggae/reflect.d",
1743 
1744 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/c_and_cpp.d",
1745 
1746 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/common.d",
1747 
1748 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/d.d",
1749 
1750 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/dub.d",
1751 
1752 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/package.d",
1753 
1754 					"/home/travis/build/atilaneves/reggae/payload/reggae/sorting.d",
1755 
1756 					"/home/travis/build/atilaneves/reggae/payload/reggae/types.d",
1757 
1758 					"/home/travis/build/atilaneves/reggae/src/reggae/dub/call.d",
1759 
1760 					"/home/travis/build/atilaneves/reggae/src/reggae/dub/interop.d",
1761 
1762 					"/home/travis/build/atilaneves/reggae/src/reggae/dub/json.d",
1763 
1764 					"/home/travis/build/atilaneves/reggae/src/reggae/json_build.d",
1765 
1766 					"/home/travis/build/atilaneves/reggae/src/reggae/reggae.d",
1767 
1768 					"/home/travis/build/atilaneves/reggae/src/reggae/reggae_main.d"
1769 
1770 				],
1771 
1772 				"copyFiles": [],
1773 
1774 				"versions": [
1775 
1776 					"Have_reggae"
1777 
1778 				],
1779 
1780 				"debugVersions": [],
1781 
1782 				"importPaths": [
1783 
1784 					"/home/travis/build/atilaneves/reggae/src",
1785 
1786 					"/home/travis/build/atilaneves/reggae/payload"
1787 
1788 				],
1789 
1790 				"stringImportPaths": [
1791 
1792 					"/home/travis/build/atilaneves/reggae/payload/reggae"
1793 
1794 				],
1795 
1796 				"importFiles": [],
1797 
1798 				"stringImportFiles": [
1799 
1800 					"/home/travis/build/atilaneves/reggae/payload/reggae/JSON.lua",
1801 
1802 					"/home/travis/build/atilaneves/reggae/payload/reggae/__init__.py",
1803 
1804 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/binary.d",
1805 
1806 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/make.d",
1807 
1808 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/ninja.d",
1809 
1810 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/package.d",
1811 
1812 					"/home/travis/build/atilaneves/reggae/payload/reggae/backend/tup.d",
1813 
1814 					"/home/travis/build/atilaneves/reggae/payload/reggae/build.d",
1815 
1816 					"/home/travis/build/atilaneves/reggae/payload/reggae/build.py",
1817 
1818 					"/home/travis/build/atilaneves/reggae/payload/reggae/buildgen.d",
1819 
1820 					"/home/travis/build/atilaneves/reggae/payload/reggae/buildgen_main.d",
1821 
1822 					"/home/travis/build/atilaneves/reggae/payload/reggae/config.d",
1823 
1824 					"/home/travis/build/atilaneves/reggae/payload/reggae/ctaa.d",
1825 
1826 					"/home/travis/build/atilaneves/reggae/payload/reggae/dcompile.d",
1827 
1828 					"/home/travis/build/atilaneves/reggae/payload/reggae/dependencies.d",
1829 
1830 					"/home/travis/build/atilaneves/reggae/payload/reggae/dub/info.d",
1831 
1832 					"/home/travis/build/atilaneves/reggae/payload/reggae/file.d",
1833 
1834 					"/home/travis/build/atilaneves/reggae/payload/reggae/options.d",
1835 
1836 					"/home/travis/build/atilaneves/reggae/payload/reggae/range.d",
1837 
1838 					"/home/travis/build/atilaneves/reggae/payload/reggae/reflect.d",
1839 
1840 					"/home/travis/build/atilaneves/reggae/payload/reggae/reflect.py",
1841 
1842 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae-js.js",
1843 
1844 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae.lua",
1845 
1846 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae.rb",
1847 
1848 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.js",
1849 
1850 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.lua",
1851 
1852 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.py",
1853 
1854 					"/home/travis/build/atilaneves/reggae/payload/reggae/reggae_json_build.rb",
1855 
1856 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules.py",
1857 
1858 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/c_and_cpp.d",
1859 
1860 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/common.d",
1861 
1862 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/d.d",
1863 
1864 					"/home/travis/build/atilaneves/reggae/payload/reggae/rules/dub.d",
1865 
1866 					"/home/travis/build/atilaneves/reggae/payload/reggae/sorting.d",
1867 
1868 					"/home/travis/build/atilaneves/reggae/payload/reggae/types.d"
1869 
1870 				],
1871 
1872 				"preGenerateCommands": [],
1873 
1874 				"postGenerateCommands": [],
1875 
1876 				"preBuildCommands": [],
1877 
1878 				"postBuildCommands": [],
1879 
1880 				"requirements": [],
1881 
1882 				"options": [
1883 
1884 					"debugMode",
1885 
1886 					"debugInfo",
1887 
1888 					"warningsAsErrors"
1889 
1890 				]
1891 
1892 			},
1893 
1894 			"dependencies": [],
1895 
1896 			"linkDependencies": []
1897 
1898 		}
1899 
1900 	]
1901 
1902 }
1903 `;
1904 
1905 @("travis string")
1906 unittest {
1907     getDubInfo(travisString);
1908 }