@@ -396,6 +396,71 @@ title: \"xxx\"
396
396
xxxx
397
397
" )))
398
398
399
+ (cort-deftest--org-generate org-generate/noweb-reference
400
+ '(((with-cort--org-generate-buffer " \
401
+ #+NAME: year
402
+ : 2020
403
+
404
+ #+NAME: whoami
405
+ #+BEGIN_SRC sh
406
+ # whoami
407
+ WHOAMI=conao3; echo $WHOAMI
408
+ #+END_SRC
409
+
410
+ * project
411
+ ** general
412
+ *** LICENSE
413
+ #+begin_src text :noweb yes
414
+ MIT License
415
+
416
+ Copyright (c) <<year()>> <<whoami()>>
417
+
418
+ Permission is hereby granted, free of charge, to any person obtaining a copy
419
+ of this software and associated documentation files (the \" Software\" ), to deal
420
+ in the Software without restriction, including without limitation the rights
421
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
422
+ copies of the Software, and to permit persons to whom the Software is
423
+ furnished to do so, subject to the following conditions:
424
+
425
+ The above copyright notice and this permission notice shall be included in all
426
+ copies or substantial portions of the Software.
427
+
428
+ THE SOFTWARE IS PROVIDED \" AS IS\" , WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
429
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
430
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
431
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
432
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
433
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
434
+ SOFTWARE.
435
+ #+end_src
436
+ "
437
+ (require 'ob-shell )
438
+ (org-generate " project/general" )
439
+ (cort--file-contents " LICENSE" ))
440
+ " \
441
+ MIT License
442
+
443
+ Copyright (c) 2020 conao3
444
+
445
+ Permission is hereby granted, free of charge, to any person obtaining a copy
446
+ of this software and associated documentation files (the \" Software\" ), to deal
447
+ in the Software without restriction, including without limitation the rights
448
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
449
+ copies of the Software, and to permit persons to whom the Software is
450
+ furnished to do so, subject to the following conditions:
451
+
452
+ The above copyright notice and this permission notice shall be included in all
453
+ copies or substantial portions of the Software.
454
+
455
+ THE SOFTWARE IS PROVIDED \" AS IS\" , WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
456
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
457
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
458
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
459
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
460
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
461
+ SOFTWARE.
462
+ " )))
463
+
399
464
; ; (provide 'org-generate-tests)
400
465
401
466
; ; Local Variables:
0 commit comments